Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> help with a simple query
I need to do a following query (using table a, b):
select *
from a
where a.col1=val1 or if a.col1=null then b.col1=val1
wherea.col2 = b.col2
how to express the if part using SQL? thanks a lot!
(basically what I want to do is: selection based tableA column1, but if tableA column1 is null, join tableA with tableB using column2 and make sure tableB column 1 equal to the input value)
Thanks!
Sent via Deja.com
http://www.deja.com/
Received on Mon Dec 18 2000 - 15:46:55 CST
![]() |
![]() |