I'm trying to insert a record only if it doesn't already exist:
INSERT INTO protectedfiles (filename)
VALUES ('New Text Document.txt')
WHERE NOT EXISTS
(SELECT filename
FROM protectedfiles
WHERE filename 'New Text Document.txt');
However I am just told that my SQL command is not ended properly.
Where am I going wrong??
Cheers,
elziko
INSERT INTO protectedfiles (filename)
VALUES ('New Text Document.txt')
WHERE NOT EXISTS
(SELECT filename
FROM protectedfiles
WHERE filename 'New Text Document.txt');
However I am just told that my SQL command is not ended properly.
Where am I going wrong??
Cheers,
elziko