Select * From
(select * from Uto_prdspec Where ditype='4743' and charindex(',1',dicode)>0) a,
(select * from Uto_prdspec Where ditype='4746' and charindex(',2',dicode)>0) b,
(select * from Uto_prdspec Where ditype='4752' and charindex(',1',dicode)>0) c
Where a.prdid=b.prdid and a.prdid=c.prdid
服务器: 消息 170,级别 15,状态 1,行 13
第 13 行: ',' 附近有语法错误。
服务器: 消息 170,级别 15,状态 1,行 14
第 14 行: 'b' 附近有语法错误。
服务器: 消息 170,级别 15,状态 1,行 15
第 15 行: 'c' 附近有语法错误。
(select * from Uto_prdspec Where ditype='4743' and charindex(',1',dicode)>0) a,
(select * from Uto_prdspec Where ditype='4746' and charindex(',2',dicode)>0) b,
(select * from Uto_prdspec Where ditype='4752' and charindex(',1',dicode)>0) c
Where a.prdid=b.prdid and a.prdid=c.prdid
服务器: 消息 170,级别 15,状态 1,行 13
第 13 行: ',' 附近有语法错误。
服务器: 消息 170,级别 15,状态 1,行 14
第 14 行: 'b' 附近有语法错误。
服务器: 消息 170,级别 15,状态 1,行 15
第 15 行: 'c' 附近有语法错误。
解决方案 »
- 【求助】SQL Server定义约束
- 我的操作系统可以安装哪个版本的sql 2005?
- 求一sql 语句,多谢
- Crystal Report 9.0高手进,小弟有难题
- 新手提问......200分相求,只能放100分,另外100分另开贴(决不食言)!!!!!!!!!(开的第二贴)
- 十万火急
- 在SQL Server2000下,如何将数据导出成XML文件?
- 為什麼我用localhost登陸連接不上呢!
- (难题)--------------------------->>将"R7-R9"之类的数据,转成"R7,R8,R9" ?
- 求一sql语句
- C# + sql 事务处理
- 提示:关键字 'CONSTRAINT' 附近有语法错误。
where a.prdid=b.prdid and a.prdID=c.prdid
and a.ditype='4743' and charindex(',1',a.dicode)>0
and b.ditype='4746' and charindex(',2',b.dicode)>0
and c.ditype='4752' and charindex(',1',c.dicode)>0
我想优化下性能!
Select * From
(
select * from Uto_prdspec Where ditype='4743' and charindex(',1',dicode,1)>0
union all
select * from Uto_prdspec Where ditype='4746' and charindex(',2',dicode,1)>0
union all
select * from Uto_prdspec Where ditype='4752' and charindex(',1',dicode,1)>0) as a
Where a.prdid=b.prdid and a.prdid=c.prdid
Select * From
(select * from Uto_prdspec Where ditype='4743' and charindex(',1',dicode)>0) a,--这逗号不是英文字符的
(select * from Uto_prdspec Where ditype='4746' and charindex(',2',dicode)>0) b,--这逗号不是英文字符的
(select * from Uto_prdspec Where ditype='4752' and charindex(',1',dicode)>0) c
Where a.prdid=b.prdid and a.prdid=c.prdid
--LZ看看
不好意思,后面的Where写错了。
(select * from Uto_prdspec Where ditype='4743' and charindex(',1',dicode)>0) as a,
(select * from Uto_prdspec Where ditype='4746' and charindex(',2',dicode)>0) as b,
(select * from Uto_prdspec Where ditype='4752' and charindex(',1',dicode)>0) as c
Where a.prdid=b.prdid and a.prdid=c.prdid