Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having trouble w/ NULL 1

Status
Not open for further replies.

Olivia123

MIS
Apr 19, 2007
29
0
0
US
I was wondering if I can wright something like this....

Code:
 a.CALL_CC IS BETWEEN NULL AND b.CA_CC1

This is actually the logic that I need, but, it won't work , is there any other way I can wright it, and use this logic.

Thank you
 
Which logic ?
Consider NULL as unknown and explain us which logic may determine if a value is between an unknown value and another value.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Is there anyway I can set the null value as '0' or '1' ?
 
In fact, you want something like this ?
WHERE (a.CALL_CC IS NULL OR a.CALL_CC BETWEEN 0 AND b.CA_CC1)

Or this ?
WHERE COALESCE(a.CALL_CC, 0) BETWEEN 0 AND b.CA_CC1)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you, the second one helped me out, I wasn't familiar with COALESCE :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top