dbTalk Databases Forums  

Need Advice

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Need Advice in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pankaj_wolfhunter@yahoo.co.in
 
Posts: n/a

Default Need Advice - 09-13-2006 , 05:47 AM






Greetings,
I have a table as:
test_table

col1 col2 col3 col4 col5
1 0 0 1 1
0 0 1 0 0
1 1 0 0 1
..................................
..................................
..................................

There is some application which is dng some processing and giving the
output
in this table in the form of 1's and 0's.
The objective is to count the record for each combination and
put them in a separate table, final_table, with the count value.

For eg:

For the first combination (1 0 0 1 1), if there are 100 such
repetitions in test_table
, so my final table will have

col1 col2 col3 col4 col5 count
1 0 0 1 1 100

and so on for different combinations.

Can anyone show me the right direction to achieve the same?

TIA

DB version Info:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production


Reply With Quote
  #2  
Old   
G Quesnel
 
Posts: n/a

Default Re: Need Advice - 09-13-2006 , 06:15 AM






It should be easy to do, by combining ...
1- Create Table ... As Select ....
2- Select ... , count(*) from ... where ... GROUP BY ...;

hth.


Reply With Quote
  #3  
Old   
pankaj_wolfhunter@yahoo.co.in
 
Posts: n/a

Default Re: Need Advice - 09-13-2006 , 06:40 AM




G Quesnel wrote:

Quote:
It should be easy to do, by combining ...
1- Create Table ... As Select ....
2- Select ... , count(*) from ... where ... GROUP BY ...;

hth.
Thanks. Actually I figured it out. Sorry for the silly question.



Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.