社区
MS-SQL Server
帖子详情
有关select @var 在exec () 中 的模梭两可的问题,急
tofool
2003-05-20 09:55:15
declare @code int
select @code=-1
select @sql='select @code=code from '+@tablename+' where '+ ltrim(rtrim(@field))+' is null '
print @sql
exec(@sql)
注:所有的变量都有定义。
它提示的错误信息是:必须定义@code 。
我想有什么办法 达到 我想要的结果??! 换一个方法也行!
...全文
109
7
打赏
收藏
有关select @var 在exec () 中 的模梭两可的问题,急
declare @code int select @code=-1 select @sql='select @code=code from '+@tablename+' where '+ ltrim(rtrim(@field))+' is null ' print @sql exec(@sql) 注:所有的变量都有定义。 它提示的错误信息是:必须定义@code 。 我想有什么办法 达到 我想要的结果??! 换一个方法也行!
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
tofool
2003-05-20
打赏
举报
回复
请问,sp_executesql 是不是任何角色,都可以使用??
还是只有admin 角色才能使用!?
happydreamer
2003-05-20
打赏
举报
回复
要用sp_executesql exec不支持动态输出
愉快的登山者
2003-05-20
打赏
举报
回复
declare @code int
select @code=-1
select @sql=N'select @code=code from '+@tablename+' where '+ ltrim(rtrim(@field))+' is null '
execute sp_executesql
@sql,
N'@code int output',
@code = @code output
select @code
pengdali
2003-05-20
打赏
举报
回复
declare @code int,@sql nvarchar(4000)
select @code=-1
select @sql='select @code=code from '+@tablename+' where '+ ltrim(rtrim(@field))+' is null '
print @sql
exec sp_executesql @sql,N'@code int output',@code output
select @code
pengdali
2003-05-20
打赏
举报
回复
declare @code int,@sql nvarchar(4000)
select @code=-1
select @sql='select @code=code from '+@tablename+' where '+ ltrim(rtrim(@field))+' is null '
print @sql
exec sp_executesql @sql,N'@code int output',@code output
select @code
firetoucher
2003-05-20
打赏
举报
回复
select @sql='
declare @code int
select @code=-1
select @code=code from '+@tablename+' where '+ ltrim(rtrim(@field))+' is null '
print @sql
exec(@sql)
pengdali
2003-05-20
打赏
举报
回复
declare @code int
select @code=-1
select @sql='select @code=code from '+@tablename+' where '+ ltrim(rtrim(@field))+' is null '
print @sql
exec sp_executesql @sql,N'@code int output',@code output
select @code
行业分类-设备装置-水陆
两
可的稳定浮体平台及其房屋的沉浮方法及其用途.zip
《水陆
两
可的稳定浮体平台及其房屋的沉浮方法及其用途》 在现代科技与工程领域,水陆...这一设备装置不仅在技术上实现了水陆转换,还在应用层面拓展了人类活动的空间和可能性,对于推动相关行业的发展具有重要意义。
功能短句的语义成分对
两
可自然物体分类的影响
在探讨功能短句的语义成分如何影响人们对
两
可自然物体分类的
问题
之前,首先要明确什么是
两
可自然物体。
两
可物体,又称为模糊物体或歧义物体,是指那些在视觉呈现上可以具有多种解释或分类的物体,例如,一张图既可以...
家庭居室装饰装修工程施工合同.pdf
由于提供的内容片段不包含实际的信息内容,而是一系列的数字、符号和模凌
两
可的片段,无法从
中
提取出具体的知识点。但根据文件的标题“家庭居室装饰装修工程施工合同.pdf”,我们可以推断出该文件可能是涉及家庭居室...
2021版高考语文一轮复习第3板块语言文字运用9辨析并修改蹭5“表意不明”与“不合逻辑”课件
在高
中
语文复习
中
,"表意不明"与"不合逻辑"是常见的语言文字运用错误,这类
问题
会影响句子的准确性和清晰度。以下是针对这些
问题
的详细分析: 1. **指代不明**:句子
中
的代词(如"他"、"这"等)没有明确的指代对象...
2021-2022计算机二级等级考试试题及答案No.12038.docx
算法的效率只与
问题
的规模有关,而与数据的存储结构无关:错误,效率还与数据结构有关。 - B. 算法的时间复杂度是指执行算法所需要的计算工作量:正确,时间复杂度衡量算法的运行时间随输入规模的增长率。 - C. ...
MS-SQL Server
34,871
社区成员
254,637
社区内容
发帖
与我相关
我的任务
MS-SQL Server
MS-SQL Server相关内容讨论专区
复制链接
扫一扫
分享
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章