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 |
|
luispcruz
Starting Member
2 Posts |
Posted - 2008-09-09 : 11:41:36
|
| Please, could anyone help me outI Write this simple taskUSE ESTATISTICAGODECLARE @nprocesso CHAR(16)GOCLOSE Cursor_C1DEALLOCATE Cursor_C1GODECLARE Cursor_C1 CURSOR FORSELECT IPRCEXEC FROM PROCESSOSORDER BY IPRCEXECGOOPEN Cursor_C1FETCH NEXT FROM Cursor_C1INTO @nprocessoWHILE @@FETCH_STATUS = 0BEGIN PRINT 'PROCESSO: ' + @nprocesso FETCH NEXT FROM Cursor_C1 INTO @nprocesso EXEC CALCULANDIAS @nprocesso ENDCLOSE Cursor_C1DEALLOCATE Cursor_C1GOEXITBut it keeps me saying:"Must declare the scalar variable "@nprocesso""Could anyone lend me a help??What I'm doing wrong?!?! |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-09-09 : 11:44:42
|
Remove all "GO" keywords. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
luispcruz
Starting Member
2 Posts |
Posted - 2008-09-09 : 11:48:52
|
| Yap... Thanks a lot!! It runs smoothly |
 |
|
|
|
|
|