|
最初由 flyeagle 发布
[B]执行之后报错如下:
服务器: 消息 203,级别 16,状态 2,过程 get_supinfo,行 14
名称 'select @str = rtrim(SUPCODE)+'/'+@str from lsupmatinfo where [ITEMID]= 11' 不是有效的标识符。
这里表名lsupmationfo和‘11’都是传进去的 [/B]
'select @str = rtrim(SUPCODE)+'/'+@str from lsupmatinfo where [ITEMID]= 11' 应该是
'select ' + @str + '=' + rtrim(SUPCODE) + '/' + @str + ' from lsupmatinfo where [ITEMID]= 11'
要区分好变量和常量。 |
|