I’m trying to INSERT INTO
without duplicates in MS Access from VB.NET.
But I get an error:
missing semicolon (;) at end of SQL statement
Is there something wrong with the SQL code?
Please guide me
Thanks
INSERT INTO datfiles (ID, [DATE], [TIME], FP, INOUT, OTHERS1, OTHERS2)
VALUES (1000, '25/04/2024', '15:00', '1', 'IN', '1', '1')
SELECT t1.ID, t1.DATE, t1.TIME
FROM datfiles t1
WHERE NOT EXISTS (SELECT ID, DATE, TIME
FROM datfiles t2
WHERE t2.ID = t1.ID
AND t2.DATE = t1.DATE
AND t2.TIME = t1.TIME);
New contributor
Tam88 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
5