SQL Query Syntax Error Message

My query is below.  I'm receiving the following error message.  Can you tell me why I might receive such a message?

Server: Msg 170, Level 15, State 1, Line 18
Line 18: Incorrect syntax near 'U'.
select * from inv_mast where item_id in (
APVS4-0206,
APVS4-0408,
SMBQS30L,
SMBQS30LT,
SMBQS30Y,
M6P,
SMBR55F02,
UC-R55VP,
SMBLXR,
SMBLX,
DPB1,
TR100-1,
TR100-4,
SA-M30TE12,
B10345A,
L52AB,
T-1255U,
T-1251,
T-1251-2)

Open in new window

timoteogaAsked:
Who is Participating?
 
bmatumburaCommented:
U need to enclose the values in single quotes since they are strings
0
 
bmatumburaCommented:
Like so
select * from inv_mast where item_id in (
'APVS4-0206',
'APVS4-0408',
'SMBQS30L',
'SMBQS30LT',
'SMBQS30Y',
'M6P',
'SMBR55F02',
'UC-R55VP',
'SMBLXR',
'SMBLX',
'DPB1',
'TR100-1',
'TR100-4',
'SA-M30TE12',
'B10345A',
'L52AB',
'T-1255U',
'T-1251',
'T-1251-2')

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.