[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

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

0
timoteoga
Asked:
timoteoga
  • 2
1 Solution
 
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now