select a.* b.* from a left join b
on charindex('/'+cast(a.id as varchar)+'/','/+'b.idl
where a.id not null
on charindex('/'+cast(a.id as varchar)+'/','/+'b.idl
where a.id not null
解决方案 »
- 求select查询语句,急
- 一个截取字段的问题
- sql server启动不了!!!急……
- 导出时报错
- 关于触发器的问题???????????????
- 求教高手:MS SQL Server 中存储过程的同步问题
- 数据库操作 如何向F_Number这一列插入形如'FFF20120001' 前7位不变后四位递增
- 我安装了sql enterprise evaluation edition,系统是xp ,可是只能连接 distributed Transaction coordinator,不能连接服务器。
- sqlserver2000修改自定义函数时发生的错误(错误3729)
- 值得研究的一个SQL语句写?
- [紧急求助!!]SQL数据库的打包问题
- 求助超简单问题
select a.* b.* from a left join b
on charindex('/'+cast(a.id as varchar)+'/','/+'b.idl)>0
where a.id not null
Argument data type varchar is invalid for argument 3 of charindex function.
on charindex('/'+cast(a.id as varchar)+'/','/+'b.idl)>0
where a.id not null你肯定写错了,在:
charindex('/'+cast(a.id as varchar)+'/','/+'b.idl)看看是不是多了逗号
select b.* from b where
b.id1=charindex('|'+cast(a.id as char)+'|','/+'b.idl))
id1
a
b
c
d
e
表b有这样id字段,包含了a的id1字段,用|分开,但其中有些是id1中没有的.
id
a|b|c|
a|c|
b|
d|f|
请把表b的id中含有id1中没有的字段的记录找出来.如何?