简体   繁体   English

消息 156,级别 15,状态 1,第 2 行 关键字“case”附近的语法不正确。 我的 SQL 有什么问题

[英]Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'case'. Whats wrong in my SQL

select 
    itemid, itemcategory.descrption as brand, itemcode, costprice, 
    qoh as whqty, gender, ia.type, display, dialcolor, strapcolor, 
    clasp, ia.case, bracelet, caseback, casedia, ia.function, 
    hand, glass, face, lug, length, waterresistant, movement, 
    movcountry, weight, warranty, box, manual 
from 
    masterdata_retail.dbo.item i 
left join
    masterdata_retail.dbo.itemcategory description ic on i.itemid = ic.itemid  
left join 
    masterdata_retail.dbo.itemstock is on i.itemid = is.itemid 
left join
    masterdata_retail.dbo.itemattribute ia on i.itemid = ia.itemid 
where 
    is.outletid = 1 
    and itemcode in ('VP46J025Y')
select itemid, itemcategory.descrption as brand, itemcode, costprice, 
qoh as whqty, gender, ia.type, display, dialcolor, strapcolor, 
clasp, ia.[case], bracelet, caseback, casedia, ia.[function], hand, glass, 
face, lug, length, waterresistant, movement, movcountry, weight, warranty, box, 
manual 
from masterdata_retail.dbo.item i 
left join masterdata_retail.dbo.[itemcategory description] ic on i.itemid = ic.itemid 
left join masterdata_retail.dbo.itemstock [is] on i.itemid = [is].itemid 
left join masterdata_retail.dbo.itemattribute ia on i.itemid = ia.itemid where [is].outletid = 1 and itemcode in('VP46J025Y')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL Server:错误消息156,级别15,状态1,第12行关键字“ AS”附近的语法不正确 - SQL Server: error Msg 156, Level 15, State 1, Line 12 Incorrect syntax near the keyword 'AS' 消息 156,级别 15,State 1,第 5 行关键字“LEFT”附近的语法不正确。 消息 156,级别 15,State 1,第 6 行 'b' 附近的语法不正确 - Msg 156, Level 15, State 1, Line 5 Incorrect syntax near the keyword 'LEFT'. Msg 156, Level 15, State 1, Line 6 Incorrect syntax near 'b' Msg 156,Level 15,State 1,Procedure inventory,Line 6 [Batch Start Line 2]关键字'Where'附近的语法不正确 - Msg 156, Level 15, State 1, Procedure inventory, Line 6 [Batch Start Line 2] Incorrect syntax near the keyword 'Where' 消息156,级别15,状态1,第50行关键字“ GROUP”附近的语法错误 - Msg 156, Level 15, State 1, Line 50 Incorrect syntax near the keyword 'GROUP' 消息156,级别15,状态1,过程ShowDirectorateList,第739行关键字'END'附近的语法不正确 - Msg 156, Level 15, State 1, Procedure ShowDirectorateList, Line 739 Incorrect syntax near the keyword 'END' 消息156,级别15,状态1,行2493关键字“ ON”附近的语法错误 - Msg 156, Level 15, State 1, Line 2493 Incorrect syntax near the keyword 'ON' 消息156,级别15,状态1,第16行关键字“ IF”附近的语法错误 - Msg 156, Level 15, State 1, Line 16 Incorrect syntax near the keyword 'IF' 消息156,级别15,状态1,第22行在关键字“具有”附近的语法错误 - Msg 156, Level 15, State 1, Line 22 Incorrect syntax near the keyword 'having' 消息156,级别15,状态1,过程CLR_TRIGGER_NAUDOJASI,第1行关键字“插入”附近的语法错误 - Msg 156, Level 15, State 1, Procedure CLR_TRIGGER_NAUDOJASI, Line 1 Incorrect syntax near the keyword 'insert' 消息 156,级别 15,状态 1,第 7 行关键字“BETWEEN”附近的语法不正确 - Msg 156, Level 15, State 1, Line 7 Incorrect syntax near the keyword 'BETWEEN'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM