12-14','#4-4','#6-13',') ) Group
Here it is; in IN clause ends with a comma + a single apostrophe, without a closing apostrophe.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I work on sql server 2012 i face syntax error when run query below
SELECT PartID,Code,Co.CodeTypeID,Co.RevisionID,Co.ZPLID,Count(1) as ConCount
FROM
[ExtractReports].dbo.PartAttributes PM
INNER JOIN [ExtractReports].dbo.Condition Co ON Co.ZfeatureKey = PM.ZfeatureKey Where (1=1 and (PM.ZfeatureKey= 1506990046 And Name ='Aluminum') Or (PM.ZfeatureKey= 1506990006 And Name ='Unthreaded') Or (PM.ZfeatureKey= 1506990016 And Name Not In('#4-40','#6-32','#1-64','#1-72','#8-32','#10-32','#2-56','#2-64','#3-48','#4-36','#3-56','#4-48','#6-40','#0-80','#5-40','#10-24','#12-24','#2-28','#4-20','#8','#4','#6','#2','#10','#14','#10-16','#2-32','#0.25-20','#8-18','#12-14','#4-4','#6-13',') ) Group By PartID,Code,Co.CodeTypeID,Co.RevisionID,Co.ZPLID Having Count(1)>= 3
so after un query above
i get these syntax error
so how to solve this issue and why this error done
Msg 105, Level 15, State 1, Line 4
Unclosed quotation mark after the character string ') ) Group By PartID,Code,Co.CodeTypeID,Co.RevisionID,Co.ZPLID Having Count(1)>= 3
'.
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near ') ) Group By PartID,Code,Co.CodeTypeID,Co.RevisionID,Co.ZPLID Having Count(1)>= 3
12-14','#4-4','#6-13',') ) Group
Here it is; in IN clause ends with a comma + a single apostrophe, without a closing apostrophe.