Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: query
Hi Seema,
what you want is very, very, *VERY* un-relational in the first place...
I guess one of the tricks you can use is write the query as a UNION ALL
construct
with four independent queries, select an additional constant (i.e. 1,2,3,4),
and sort on that column (optionally suppressing it from the output)
hope this helps,
kind regards,
Lex.
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On
Behalf Of Seema Singh
Sent: Tuesday, March 29, 2005 14:04
To: oracle-l_at_freelists.org
Subject: query
hi
I'm getting the output from following
select known_category_id, count(rowid) from ovt_recognized_categories where
known_category_id in (3,1,8,7) group by known_category_id ;
KNOWN_CATEGORY_ID COUNT(ROWID)
----------------- ------------
1 1 3 1 7 1 8 1
3 1 1 1 8 1 7 1
ROWNUM ROWID KNOWN_CATEGORY_ID
---------- ------------------ -----------------
1 AAANmrAAcAAAY0wAAA 986 2 AAANmrAAcAAAY0wAAB 1 3 AAANmrAAcAAAY0wAAC 2 4 AAANmrAAcAAAY0wAAD 3 5 AAANmrAAcAAAY0wAAE 4 6 AAANmrAAcAAAY0wAAF 5 7 AAANmrAAcAAAY0wAAG 6 8 AAANmrAAcAAAY0wAAH 7 9 AAANmrAAcAAAY0wAAI 8 10 AAANmrAAcAAAY0wAAJ 9Please sugget what would be query.
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 29 2005 - 08:15:31 CST
![]() |
![]() |