I am writing a query to filter a table by a certain field. However, the filter I am using is being evaluated as a column for some unknown reason.
i.e.
SELECT prn FROM CompanyPack WHERE prn = "212"
In this query, SSMS 2012 throws an error in which it is telling me that "212" is an invalid column name, but it is not a column at all.
prn is a nvarchar(50).
Any advice?
Use single quotes '
' not double quotes "
. Like so
SELECT prn FROM CompanyPack WHERE prn = '212'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With