earwig75, Since you are doing a left outer join, if there is a matching MemberNumber in MembTableB, you just need to check if the dbo.membTableB.MemberNumber column is not blank. You'll need to add the dbo.MembTableB.MemberNumber column to your SELECT statement. However, because ColdFusion's query results don't carry fully qualified column names (i.e. dbo.membTableA.MemberNumber and dbo.membTableB.MemberNumber will both be listed as MemberNumber), you will have to use an alias on that column. Also, if you use aliases on table names, it will simplify the rest of your query. Here's a cleaner version: SELECT tblA.MemberNumber, tblA.StatusCode, tblB.Status, tblB.MemberNumber as MemberNumberB FROM dbo.MembTableA AS tblA LEFT OUTER JOIN dbo.membTableB AS tblB ON tblA.MemberNumber = tblB.MemberNumber Where tblA.status IS NULL AND (tblA.StatusCode) = <cfqueryparam value="555" cfsqltype="cf_sql_varchar"> or tblB.Status = <cfqueryparam value="999" cfsqltype="cf_sql_varchar"> Will MemberNumber always appear in MembTableA and only sometimes in MembTableB? If so, then the modified query should work. If the number might appear in MembTableA sometimes, or might appear in MembTableB sometimes, then the query probably needs to be redesigned. If MemberNumber will always appear in MembTableA, your <cfif> could then look like this: <cfif MemberNumberLst.MemberNumberB <> ''> Also, you might want to check the location of the parenthesis in your WHERE clause. AND operators take precedence over OR operators, so this query is going to either find records where both the tblA.status is null AND tblA.StatusCode equals '555', or records where tblB.Status equals '999'. Is this precisely what you want? HTH, -Carl V.
... View more