Start a new topic
Solved

Database Query @ symbol treated as parameter

A database query contains an @ symbol where the symbol does not represent a query parameter.


Example 1:


DECLARE @variable


variable is treated as a parameter.


Example 2:


SELECT * WHERE EMAIL = 'tom@acme.com'


acme.com is interpreted as a parameter.


To overcome this issue, prefix the @ symbol with a forward slash.


Example:


DECLARE \@variable

SELECT * WHERE EMAIL = 'tom\@acme.com'

Login or Signup to post a comment