触发器中语句出错Syntax error near 'into' on line ...

isalsfy 2013-09-17 09:03:37
declare cer_no char(10);
declare cer_count integer;
declare cmd char(256);

set cmd = 'select count(*) from calibration where C2395 like ''' || cer_no || '%''';
execute immediate cmd into cer_count;

这段语句问题在哪里,请帮忙看看,在线等……
...全文
377 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lgjlry 2013-09-22
  • 打赏
  • 举报
回复
declare @cer_no char(10); declare @cer_count integer; declare @cmd char(256); set @cmd = 'select count(*) from calibration where C2395 like ''' || cer_no || '%'''; execute immediate @cmd into @cer_count;
ceozenliu 2013-09-17
  • 打赏
  • 举报
回复
set cmd = 'select cer_count=count(*) from calibration where C2395 like ''' || cer_no || '%'''; execute immediate cmd ;
  • 打赏
  • 举报
回复
看看手册吧。

2,596

社区成员

发帖
与我相关
我的任务
社区描述
Sybase相关技术讨论区
社区管理员
  • Sybase社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧