Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> help with a simple query

help with a simple query

From: <javadrink_at_my-deja.com>
Date: Mon, 18 Dec 2000 21:46:39 GMT
Message-ID: <91m0jq$dl2$1@nnrp1.deja.com>

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:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US