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 |
Chris_Kelley
Posting Yak Master
114 Posts |
Posted - 2014-08-09 : 10:48:49
|
c |
|
namman
Constraint Violating Yak Guru
285 Posts |
Posted - 2014-08-09 : 11:34:28
|
DECLARE TEST_CURSOR CURSOR FAST_FORWARDFORSELECT FIRSTNAME,LASTNAME,BIRTHDAY FROM #TEST ORDER BY BIRTHDAY ASCOPEN TEST_CURSORFETCH NEXT FROM TEST_CURSORINTO @FIRSTNAME,@LASTNAME,@BIRTHDAYPRINT @FIRSTNAME + ' ' + @LASTNAME + ' ' + @BIRTHDAYWHILE @@FETCH_STATUS = 0BEGIN-- code should be herePRINT @FIRSTNAME + ' ' + @LASTNAME + ' ' + @BIRTHDAY-- ------FETCH NEXT FROM TEST_CURSORINTO @FIRSTNAME,@LASTNAME,@BIRTHDAYPRINT @FIRSTNAME + ' ' + @LASTNAME + ' ' + @BIRTHDAYENDCLOSE TEST_CURSORDEALLOCATE TEST_CURSOR |
|
|
Chris_Kelley
Posting Yak Master
114 Posts |
Posted - 2014-08-09 : 12:36:27
|
c |
|
|
|
|
|