Zit al n tijd te klooien met een SQL-query, misschien dat jullie t zien!
Gebruik ColdFusion en een Access--database. Ik denk echter dat het deze keer ligt aan de query. Dit is m
Dit levert als foutmelding
Dit, terwijl de SUB-query toch probleemloos een resultaat oplevert. Wat doe ik fout?
code:
1
2
3
4
5
6
7
8
9
| DELETE FROM SelectMatches
WHERE (InschrijfID, BedrID) IN
( SELECT SelectMatches.InschrijfID, SelectMatches.BedrID
FROM rp_cv_stat, CV_Persoonsgegevens, SelectMatches
WHERE ((CV_Persoonsgegevens.CV_datum < rp_cv_stat.datumtijd)
AND (rp_cv_stat.InschrijfID = SelectMatches.InschrijfID)
AND (CV_Persoonsgegevens.InschrijfID = SelectMatches.InschrijfID)
AND (rp_cv_stat.bedrID = SelectMatches.bedrID))
) |
Dit levert als foutmelding
Hmmm, niet zo mooi. Als ik de IN vervang door EXISTS krijg ik een syntax-error als resultaat.You have written a subquery that can return more than one field without using the EXISTS reserved word in the main query's FROM clause. Revise the SELECT statement of the subquery to request only one field
Dit, terwijl de SUB-query toch probleemloos een resultaat oplevert. Wat doe ik fout?
There's no such thing as a mistake, just happy accidents - Bob Ross
Relaxte muziek: altijd okee!
- Soulseek rulez -