H here4real Registered User. Local time Today, 11:59 Joined May 1, 2013 Messages 87 Mar 24, 2014 #1 I have a query where I want to check if a value of one field exists in another table. If it does, I want to set a value to True and if not set it to False. What is the easiest way to do this? Thanks.
I have a query where I want to check if a value of one field exists in another table. If it does, I want to set a value to True and if not set it to False. What is the easiest way to do this? Thanks.
Guus2005 AWF VIP Local time Today, 17:59 Joined Jun 26, 2007 Messages 2,642 Apr 4, 2014 #2 You could use a left join for this purpose. Code: select A.onefield, B.otherfield from table1 A left join othertable B on A.onefield = B.otherfield Where B.otherfield equals NULL, B doesn't have this value. Using the build in Nz function you can convert the NULLs to booleans. Please provide the actual SQL statement for a to the point response. HTH
You could use a left join for this purpose. Code: select A.onefield, B.otherfield from table1 A left join othertable B on A.onefield = B.otherfield Where B.otherfield equals NULL, B doesn't have this value. Using the build in Nz function you can convert the NULLs to booleans. Please provide the actual SQL statement for a to the point response. HTH