D
Dirk
I had designed a query with subquery that worked fine but lost it after one
of Access famous hiccups. (Function was gone from my code). Upon redesigning
I can't seem to get it to work:
SELECT Count(*) AS Aantal
FROM DTB_FACTUURUITREGELS AS FUR
WHERE FUR.FCU_ID=[ID] AND FUR.FUR_ID Not In (SELECT FUR.FUR_ID_CRED_OP
FROM DTB_FACTUURUITREGELS FUR INNER JOIN DTB_FACTUURUIT FCU ON FUR.FCU_ID =
FCU.FCU_ID
WHERE FCU.FST_ID = 5);
Disecting this:
SELECT FUR.FUR_ID_CRED_OP
FROM DTB_FACTUURUITREGELS FUR INNER JOIN DTB_FACTUURUIT FCU ON FUR.FCU_ID =
FCU.FCU_ID
WHERE FCU.FST_ID = 5
Delivers 5 records with all null values.
SELECT Count(*) AS Aantal
FROM DTB_FACTUURUITREGELS AS FUR
WHERE FUR.FCU_ID=[ID]
Delivers 2 for a certain ID. FUR_ID's are never null since it is a primary
key.
And STILL the Not In operator evaluates that both of the FUR elements have
an ID equal to null apparently.
I am sure I have to be missing something here because logically this should
be impossible.
of Access famous hiccups. (Function was gone from my code). Upon redesigning
I can't seem to get it to work:
SELECT Count(*) AS Aantal
FROM DTB_FACTUURUITREGELS AS FUR
WHERE FUR.FCU_ID=[ID] AND FUR.FUR_ID Not In (SELECT FUR.FUR_ID_CRED_OP
FROM DTB_FACTUURUITREGELS FUR INNER JOIN DTB_FACTUURUIT FCU ON FUR.FCU_ID =
FCU.FCU_ID
WHERE FCU.FST_ID = 5);
Disecting this:
SELECT FUR.FUR_ID_CRED_OP
FROM DTB_FACTUURUITREGELS FUR INNER JOIN DTB_FACTUURUIT FCU ON FUR.FCU_ID =
FCU.FCU_ID
WHERE FCU.FST_ID = 5
Delivers 5 records with all null values.
SELECT Count(*) AS Aantal
FROM DTB_FACTUURUITREGELS AS FUR
WHERE FUR.FCU_ID=[ID]
Delivers 2 for a certain ID. FUR_ID's are never null since it is a primary
key.
And STILL the Not In operator evaluates that both of the FUR elements have
an ID equal to null apparently.
I am sure I have to be missing something here because logically this should
be impossible.