June 25, 2002 at 2:56 am
Having a real memory lapse. I have a recordset that's based on an outer join, no problem. BUT one of the tests in the WHERE statement is against a column that could be NULL as a result of the outer join set.
I want to perform the WHERE test only if the offending column is not null. I'm sure I can do it but I just don't know how.
Any ideas....
I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961
I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961
June 25, 2002 at 3:34 am
select * from orders where shipregion is not null
June 25, 2002 at 8:13 am
Didn't explain myself properly
SELECT * from [tablename]
LEFT OUTER JOIN [tablename2].......
WHERE [tablename.fldname_1] = [value]
AND [tablename.fldname_2] > [tablename2.fldname] (ONLY IF tablename.fldname is not null)
I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961
I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961
June 25, 2002 at 8:29 am
Try including it in your join rather than the where.
Andy
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply