命令成功完成 [英] The command(s) completed successfully

查看:35
本文介绍了命令成功完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个下面给出的存储过程......它应该打印我使用 PRINT 命令打印的值.而是打印这些值,当我从查询分析器执行此过程时,它显示命令成功完成".你能建议修改代码或其他解决方案吗

I have written a stored procedure given below....it should print the values I am printing using PRINT command. But rather printing these values, when I executed this procedure from Query Analyzer its shows 'The command(s) completed successfully'. Can u suggest any modification in code or other solutions

提前致谢... :)

Thanks in advance... :)

CREATE PROCEDURE  getPullCords(@start_dt varchar(25),@end_dt varchar(25))
 AS
declare @t varchar(25),@p varchar(50),@v int
declare @mycur CURSOR

SET @mycur  =  CURSOR FAST_FORWARD
FOR
select timestamp,point_id,_val from tcf1_pullcord where timestamp between @start_dt and @end_dt

OPEN @mycur
FETCH NEXT FROM @mycur
INTO @t,@p,@v

WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @t
PRINT @p
PRINT @v
FETCH NEXT FROM @mycur
INTO @t,@p,@v
END

CLOSE @mycur
DEALLOCATE @mycur

GO

推荐答案

您为打印数据而编写的任何内容都是正确的.

Whatever you've written to print data is correct.

但是,如果有要打印的数据,那么它正在打印,您将无法打印数据Results 选项卡.

However, if there is data to print then it is printing and you'll not be able to the printed data Results tab.

要查看打印的数据,请选择结果部分的 Messages 标签.

To see your printed data choose Messages tab of the result section.

谢谢.

这篇关于命令成功完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆