SQL Error (102): Incorrect syntax near ''.

Suncatcher's profile image Suncatcher posted 9 years ago in General Permalink
I get this error while trying to execute simplest select via F9
[url=http://s11.postimg.org/jyk12rddv/Unbenannt2.png[/url]
But I swear that syntax is absolutely correct. In SSMS 2012 it works like a charm.
Also it works in Heidi if I select the code explicitly and press Ctrl-F9.
Any suggestions?
Suncatcher's profile image Suncatcher posted 9 years ago Permalink
http://s11.postimg.org/jyk12rddv/Unbenannt2.png
[expired user #9075]'s profile image [expired user #9075] posted 9 years ago Permalink
Does it work if you remove the [ and ]'s?
[expired user #9075]'s profile image [expired user #9075] posted 9 years ago Permalink

Does it work if you remove the [ and ]'s?



Sorry, scrap that. Derp moment.
Suncatcher's profile image Suncatcher posted 9 years ago Permalink

Does it work if you remove the [ and ]'s?


No, the same result. But at least it started to highlight keywords.
[expired user #9328]'s profile image [expired user #9328] posted 9 years ago Permalink
Can you post SQL query here?
Suncatcher's profile image Suncatcher posted 9 years ago Permalink

Can you post SQL query here?


Extremely simple query!
/****** Script for SelectTopNRows command from SSMS  ******/
SELECT TOP 1000 [cmCostCenter]
,[cmLogonName]
FROM [FIM_SAP_BPM].[dbo].[v_Globus_CostManager_v2]
WHERE [cmCostCenter] = 5000359200
Suncatcher's profile image Suncatcher posted 9 years ago Permalink
Well, I opened these sql-files in Heidi, copied query into new tab and resaved them. not all works fine. It seems to be some artifact of mssql markup.
Suncatcher's profile image Suncatcher posted 9 years ago Permalink
*Now all works fine

Please login to leave a reply, or register at first.