I know that I should be able to wrap my head around this but for some reason my brain isn’t there today.
This is my query to which I need help in setting the fields criteria:
LocCondID = Parent/Child
LocID=The suite
TenantID= The Tenant who occupies the suite
BuildingID= The building in which the suite is located
*IN=The fields I need to set criteria for
Every field can have one of eleven possible ID Reference number of a letter code. The code that I am after is “R” or “10”(as I use its ID instead which stands for “repair”)
So each *IN field can potentially have a “R” code value but unlikely as everything in the suite would trashed and everything would require repair. So some will have a “R” some won’t. What I need is a criteria that will extract the “R” from any and all of them.
The *IN fields are all multi-select because there is the possibility to have a combination of letter codes for each field.
If I put a “10” in the criteria box and if there is a record that has an R in the field it will show up. The problem is I can’t put “10” in every field because I don’t return anything when I run the query.
From what I’ve learned so far I think a IIF statement would be require but don’t really know how to formulate it. The statement also must account for Null value as well. Can anyone help?
This is my query to which I need help in setting the fields criteria:
Code:
SELECT LocSymbioseT.LocCondID, LocSymbioseT.LocID, LocSymbioseT.TenantID, LocSymbioseT.BuildingID, LocLivCondT.LWallTrimIN, LocLivCondT.LCeilingIN, LocLivCondT.LfloorIN, LocLivCondT.LTvTelephoneSwitchOutletIN, LocLivCondT.LClosetIN, LocLivCondT.LIlluminationIN, LocLivCondT.LWindowCoveringIN, LocLivCondT.LThermostatIN FROM LocSymbioseT LEFT JOIN LocLivCondT ON LocSymbioseT.LocCondID = LocLivCondT.LocCondID;
LocID=The suite
TenantID= The Tenant who occupies the suite
BuildingID= The building in which the suite is located
*IN=The fields I need to set criteria for
Every field can have one of eleven possible ID Reference number of a letter code. The code that I am after is “R” or “10”(as I use its ID instead which stands for “repair”)
So each *IN field can potentially have a “R” code value but unlikely as everything in the suite would trashed and everything would require repair. So some will have a “R” some won’t. What I need is a criteria that will extract the “R” from any and all of them.
The *IN fields are all multi-select because there is the possibility to have a combination of letter codes for each field.
If I put a “10” in the criteria box and if there is a record that has an R in the field it will show up. The problem is I can’t put “10” in every field because I don’t return anything when I run the query.
From what I’ve learned so far I think a IIF statement would be require but don’t really know how to formulate it. The statement also must account for Null value as well. Can anyone help?
Comment