Search code examples
sqldatabasems-access

SQL asks for Parameter Value after checking columns names


I'm running a query to search for mismatching values between a master table and other linked tables. The problem is that I'm getting a "Enter Parameter Value" on DIS_ID and three more. Any thoughts on that?

SELECT * 
FROM FILES f 
WHERE   f.Network_ID not in (SELECT Network_ID from Networks) OR
    f.[009_Network] not in (SELECT Network_Code from Networks) OR

    f.[LINE1_ID] not in (SELECT LINE_ID from LINE) OR
    f.[Line 1] not in (SELECT Line_Code from LINE) OR

    f.[Trans_ID] not in (SELECT Trans_ID from Transportation_Mode) OR
    f.[Transportation_Mode] not in (SELECT Mode from Transportation_Mode) OR

    f.[Discipline_ID] not in (SELECT DIS_ID from DISCIPLINE) OR
    f.[012_Discipline] not in (SELECT [Dis Code] from DISCIPLINE) OR

    f.[013_System] not in (SELECT [Sys Code] from Systems) OR
    f.[System_ID] not in (SELECT System_ID from Systems);

Solution

  • I have created some of these tables and the query and it works fine. See the attached picture.enter image description here