|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
Hi anyone can help me out please...
Say that i have this tables my_table1 loc_name i have this simple code to count numbers of record in the table select loc_name, count(*) from my_table1 where loc_name='S' group by loc_name it will display something like this loc_name count(*) S 4 if i wan to count another separate loc_name='E' and at the end have a count to count the sum of both 'S' and 'E' and display it like this how do i do it loc_name count(*) S 4 E 8 ********************************** sum 12 thank you |
|
#2
|
|||
|
|||
|
Use the following SQL*Plus command:
SQL>break on report SQL>compute sum label Total of count on report now run your query like that: select loc_name, count(*) count from my_table1 where loc_name in ('S','E') group by loc_name |
|
#3
|
|||
|
|||
|
Thanks a lot
Thank you so much...it does exactly wat i want
![]() |
|
#4
|
|||
|
|||
|
Try using qlr manager. It supports both Oracle and MySQL database reporting. It will allow you to write and save both queries and layouts (layouts format your output). It will easily handle this type of formatting.
Katman |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > How to count and display it like this? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|