Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
-Dman100-
Posting Yak Master
210 Posts |
Posted - 2009-03-11 : 17:59:37
|
| I'm trying to debug a stored procedure in Query Analyzer and determine why I keep getting an incorrect result back.How do I print the result to the screen and execute the stored procedure.This is what I was trying:DECLARE @result intSET @result = EXEC spUpdateFile 51,'SAAG.PDF','\CompassFileUpload\','Solutions-At-A-Glance','','51SAAG.PDF', 0PRINT @resultIncorrect syntax near the keyword EXECThanks for any help. |
|
|
guptam
Posting Yak Master
161 Posts |
Posted - 2009-03-11 : 19:43:30
|
| try ...DECLARE @Result intEXEC @Results = spUpdateFile 51,'SAAG.PDF','\CompassFileUpload\','Solutions-At-A-Glance','','51SAAG.PDF', 0PRINT @Results-- Mohit K. GuptaB.Sc. CS, Minor JapaneseMCITP: Database AdministratorMCTS: SQL Server 2005http://sqllearnings.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-03-12 : 02:32:40
|
quote: Originally posted by -Dman100- I'm trying to debug a stored procedure in Query Analyzer and determine why I keep getting an incorrect result back.How do I print the result to the screen and execute the stored procedure.This is what I was trying:DECLARE @result intSET @result = EXEC spUpdateFile 51,'SAAG.PDF','\CompassFileUpload\','Solutions-At-A-Glance','','51SAAG.PDF', 0PRINT @resultIncorrect syntax near the keyword EXECThanks for any help.
Did you use output variable in the procedure?MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-12 : 13:28:42
|
| http://www.sqlteam.com/article/stored-procedures-returning-data |
 |
|
|
|
|
|
|
|