RadhaKrishnaKiJaya
asked on
Need help with Query
Hi Experts,
I am trying to execute the following SQL
SET @SQL='Select * from CUSTEVENT where CustEvntOpenOrClose="O"'
But I am getting error "Invalid column name 'O'." What am I doing wrong.
I am trying to execute the following SQL
SET @SQL='Select * from CUSTEVENT where CustEvntOpenOrClose="O"'
But I am getting error "Invalid column name 'O'." What am I doing wrong.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much.
SET @q = 'Select * from tab where col2=''O'''
difference is in quotes, all should be single quotes
Open in new window