Cursor Question
Thank you for the information but it was just a learning thing I have no use for them now but thought I should atleast have a basic understanding or them.
View ArticleCursor Question
Here's an exampleDECLARE @t TABLE (FName varchar(50), LName varchar(50));INSERTINTO @t VALUES ('Sam','Smith'), ('Bob','Jones'), ('Bill','Brown'), ('Vern','Rabe');DECLARE @FName varchar(50), @LName...
View ArticleCursor Question
I am just tryint to do some learning.Sail and tom answered my question now it makes sense and I can continue with the learning. Thanks AllChris Hartmann
View ArticleCursor Question
Exactly what are you trying to do?--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards...
View ArticleCursor Question
Initially the @@FETCH_STATUS gets 0 and the loop was executed.At the end of the loop, @@FETCH_STATUS becomes -1 as the loop is terminated.For the second run @@FETCH_STATUS retains -1 (from the...
View ArticleCursor Question
Why did you comment out the first Fetch Next? If you uncomment it, then it will work. The problem you are having with the code as it is is that a the end of the first run @@FETCH_STATUS is not zero,...
View ArticleCursor Question
Your fetch statements should probably populate your variables, e.g., ..fetch next from db_cursor2 into @usrName, @FirstName. Why is the first fetch commented out? It's needed.Vern Rabe
View ArticleCursor Question
When I run this code the first time in the SQL Server Management Studio it returns the results I expect but if I run it a second time I do not get any results back.I am trying to learn about cursors...
View Article