Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table which consists of Company_Code, Customer Code, Customer Code_112
I only want those records in my table where Customer Code is present in Customer Code_112, But I do not want to check for Company_Code=320.
I wrote this if(Exists([Customer Code_112],[Customer Code]),1,0) as Flag
But this is also searching for Company_Code = 320.
Please help.
if(Exists([Customer Code_112],[Customer Code]) and Company_Code<>320,1
,if(Company_Code=320,1,0)) as Flag
if(Exists([Customer Code_112],[Customer Code]) and Company_Code<>320,1
,if(Company_Code=320,1,0)) as Flag
Try
IF( [Customer Code_112] = [Customer Code] and [Customer Code] <> 320,1,0)
if this is the script you can use this in the where clause, just remove from from the IF