Home » SQL & PL/SQL » SQL & PL/SQL » SQL QUERY
SQL QUERY [message #20759] Wed, 19 June 2002 05:52 Go to next message
R.C
Messages: 1
Registered: June 2002
Junior Member
I want to make one SQL query on a table with three different filter which can not be set in one filter to extract data, like this :

select attribute1,attribute2 from table1 where filter1
INTERSECT
select attribute1,attribute2 from table1 where filter2
INTERSECT
select attribute1,attribute2 from table1 where filter3

But it is not possible

I do not want to do this :
select attribute1,attribute2 from table1 where filter1 and filter2 and filter3.

Do you know how to make,without creating a temporary table, one query like this ?
Re: SQL QUERY [message #20760 is a reply to message #20759] Wed, 19 June 2002 06:38 Go to previous messageGo to next message
oraboy
Messages: 97
Registered: October 2001
Member
seems to be possible..
why not this
select * from tn where filter1 and filter2 and filter3

(all I can think of filter is a condition)

and I dont understand why cant you give 3 conditions in the same SQL..

pls post ur situtation with more details

oraboy
Re: SQL QUERY [message #20788 is a reply to message #20759] Thu, 20 June 2002 06:25 Go to previous message
koteswara rao p.
Messages: 10
Registered: June 2002
Junior Member
hi
r.c

you can do that on useing alias names.

regards
koti
Previous Topic: ANALYZE
Next Topic: Group by and Order by
Goto Forum:
  


Current Time: Thu Apr 25 11:15:29 CDT 2024