Can anyone tell me what is wrong with this query, I would be most grateful (the error I'm getting is Server: Msg 156, Level 15, State 1, Line 3 Incorrect syntax near the keyword 'where'.)
Here's the tsql
Insert Into tbl_ScannedFiles (Folder, Path, FilName, DMIS, Loc, LName, SSN, PatCat, RegNbr)
Values '21cshfolder', 'fullpath', 'FileName', '0109', 'IZ', 'TATE', '475527006', 'A99', '1234567')
where NOT EXISTS
(SELECT * FROM tbl_ScannedFiles WHERE FilName = 'FileName')
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!