字符串是:'10,11,110'我要转换成10,11,110
是在存储过程执行的
因为是操作testID not in('10,11,110'),testID是int类型,所以要testID not in(10,11,110)
是在存储过程执行的
因为是操作testID not in('10,11,110'),testID是int类型,所以要testID not in(10,11,110)
解决方案 »
- 问个奇怪的问题啊,group by后面的顺序不同的话结果会不同吗?
- 求个sql语句
- 简单问题
- 关于 exec sp_oamethod 参数问题
- 请教高手:重装sql server2000的问题????
- 如何取出一个主ID对应的多个ID中提交时间最晚的一个
- 在sql server 中,文件,文件组 和数据库是什么关系??等待……
- 求救!蛮难写的SQL语句!回答者都有分!谢谢
- 远程备份问题?win2000 server+sql server7.0/2000对win2000 server +sql server7.0/2000平台远程备份
- SQL2000导出数据库中表到c盘下的问题。
- 存储过程的优化问题
- 请问表结构
declare @str varchar(30)
set @str='10,11,110'exec(' where testID not in('+@str+')')
if object_id('tb')is not null drop table tb
go
create table tb(id int identity,testid int)
insert tb select
12 union all select
10 union all select
110
declare @str varchar(30)
set @str='10,11,110'exec(' select * from tb where testID not in('+@str+')')
id testid
----------- -----------
1 12(1 行受影响)
declare @str varchar(255)
set @str='10,11,110'
set @temp='select ......where testid not in('+@str+')'
select @temp