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 |
DURGESH
Posting Yak Master
105 Posts |
Posted - 2008-10-17 : 01:31:04
|
i have declared a cursor cur_m dynamically, when i am executing the code i am getting the following errorServer: Msg 16915, Level 16, State 1, Line 1A cursor with the name 'CUR_M' already exists.what could be the problemHelp me out to solve this issueDurgesh J |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-17 : 02:15:30
|
The problem is that you1) Use dynamic SQL2) Use cursor in dynamic SQL E 12°55'05.63"N 56°04'39.26" |
 |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-10-17 : 07:58:40
|
If code inside your cursor fails such that execution is halted then you need to highlight and run the part of your code that CLOSEs and DEALOCATEs your cursor before trying to run the whold thing again.EDIT:or perhaps you have a logic problem where control of flow statements bypass the CLOSE/DEALOCATE.Be One with the OptimizerTG |
 |
|
|
|
|