Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Interesting SQL Statement Problem...
SELECT T1.col2,
T2.col2
FROM tab1 T1,
tab1 T2
WHERE T1.col1 = 1
AND T2.col1 = 2;
You aren't joining anything, so I think your strategy would involve a decode and a single table query.
Try something like this;
select decode(col1,1,col2,NULL), decode(col1,2,col2,NULL) from tab1;
BTW, I just went to send you the reply and my newsreader told me that you had posted this to many newsgroups, so I added this extra note. Indiscriminate Cross-posting is bad practice and you will piss alot of people off, and my answering you may do that as well. Be more discriminate in the future. People notice that you have done this, and with sophisticated newsreaders (which alot of the best posters will have), any more posts in the future by you, may not even be seen because these people will tell their newsreader to obliterate you from their view of the newsgroup.
-- Galen Boyer Database Architect Primix Solutions, www.primix.comReceived on Sun Jul 23 2000 - 00:00:00 CDT
![]() |
![]() |