I'm using the following Select statement to select information from a table. It works well when I set [Report ID=1].
I however, want to find report id's that equal both 1 and 2. Ultimately, this will be a dynamic SQL statement, but I need to check literal entries first. I'm having problems constructing this select statement in a way to select reports that me criteria for 1 and 2. Can someone provide some insight. I'm trying to build a nested SQL statement.
Code:
AND t.[Report ID]=1 And i.[Report ID]=1
I however, want to find report id's that equal both 1 and 2. Ultimately, this will be a dynamic SQL statement, but I need to check literal entries first. I'm having problems constructing this select statement in a way to select reports that me criteria for 1 and 2. Can someone provide some insight. I'm trying to build a nested SQL statement.
Code:
SELECT t.[Report ID], f.[Full Field Name]
FROM MasterTBLReport AS t, TBL_FieldID AS f, TBL_Index AS i
WHERE f.[Field ID]=i.[Field ID]
AND t.[Report ID]=1 And i.[Report ID]=1