Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 14th, 2004, 11:26 AM
bstroudva bstroudva is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 22 bstroudva User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
JDBC query formatting

Is it possible to do the following with JDBC and oracle db

For example, I create the following sql query using jdbc
Select department_id, employee_id, salary from emp;
I'm able to display ther results on a jsp page in tabular format
from the result set. However, I would like to format the result as follows.

department_id 1
Employee1 598.00
Employee2 100.00
department_id 1 total 698.00
department_id 2
Employee3 100.00
Employee4 200.00
department_id 2 total 300.00

Report Total 998.00
Is it possible to do this using JDBC, sql and dislpaying on jsp page without using a report writing tool

Reply With Quote
  #2  
Old June 16th, 2004, 11:59 AM
astrocanis astrocanis is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 14 astrocanis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to astrocanis
Not a problem with either JDBC or SQL. You will have to perform formatting functions within your JSP. One way is to break the queries down into two...select department then employees in another query and nesting tables in JSP.

Reply With Quote
  #3  
Old June 16th, 2004, 07:40 PM
bstroudva bstroudva is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 22 bstroudva User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
That's the solution that I started working on. Thanks for the confirmation!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > JDBC query formatting


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway