I want to check my database for records that I already have recorded before making a web service call.
Here is what I imagine the query to look like, I just can\'t
Use:
SELECT x.id
FROM (SELECT @param_1 AS id
FROM DUAL
UNION ALL
SELECT @param_2
FROM DUAL
UNION ALL
SELECT @param_3
FROM DUAL
UNION ALL
SELECT @param_4
FROM DUAL) x
LEFT JOIN TABLE t ON t.id = x.id
WHERE x.id IS NULL
If you need to support a varying number of parameters, you can either use: