No announcements
Found 1026938 threads
-
1 Votes
Cursors vs while loop
Can somebody build a better mousetrap with WHILE loop as opposed to CURSOR WHILE loop?Answered | 10 Replies | 25885 Views | Created by Sqlcts - Friday, August 31, 2007 5:00 PM | Last reply by joeller - Friday, October 31, 2014 2:29 PM -
0 Votes
while loop insted of Cursor
> just wonder is while loop better than cursor from the performance perspective specially when talk about OLTP db type because my loop or cursor will ...Answered | 6 Replies | 12861 Views | Created by SQL Kitchen - Saturday, October 29, 2011 9:20 AM | Last reply by --CELKO-- - Saturday, October 29, 2011 10:40 PM -
1 Votes
Cursor or a while loop
> I have a request to loop through 309 records [sic] to see which of them are "like" a service number field [sic] in another table.Answered | 6 Replies | 1177 Views | Created by RAYAIN - Sunday, August 24, 2014 5:58 AM | Last reply by --CELKO-- - Sunday, August 24, 2014 2:08 PM -
1 Votes
Converting Cursor to While loop
You do not need a cursor loop at all.Answered | 12 Replies | 1269 Views | Created by AmitSSRS - Monday, December 28, 2015 9:34 PM | Last reply by Erland Sommarskog - Wednesday, January 6, 2016 8:44 PM -
6 Votes
While loop VS For loop
The first example you provided contravenes the commonly accepted semantic and would be better served semantically by the while loop.Answered | 12 Replies | 13510 Views | Created by GR4YF0X - Friday, March 12, 2010 5:50 PM | Last reply by CS001 - Thursday, April 1, 2010 7:57 PM -
1 Votes
what is the advantage of using cursor in sql sript over while loop
WHILE loops do not scale well.Answered | 4 Replies | 3610 Views | Created by Bibek Gautam - Tuesday, May 8, 2012 10:53 AM | Last reply by Kalman Toth - Tuesday, May 8, 2012 11:07 AM -
2 Votes
Cursor much faster when loop.
A simple substitution of a loop for a cursor for no particular reason is unlikely to be beneficial.Answered | 2 Replies | 2101 Views | Created by Andy Mishechkin - Wednesday, September 4, 2013 6:23 PM | Last reply by scott_morris-ga - Wednesday, September 4, 2013 7:56 PM -
1 Votes
How to avoid cursors and loops
no of ways u can avoid the cursors *Select, Loop, Process at out side of Data Base *We can avoid the cursor using ...Answered | 12 Replies | 14931 Views | Created by prithvi4u - Tuesday, September 26, 2006 8:44 PM | Last reply by Rajesh Chekuri - Friday, February 8, 2013 8:50 AM -
0 Votes
Cursor and Loops
All you have to do it use for each loop to loop through each server and set up your connection to be dynamic.Answered | 2 Replies | 4895 Views | Created by simon445 - Friday, June 3, 2011 2:51 PM | Last reply by Alex Feng (SQL) - Tuesday, June 7, 2011 12:54 PM -
2 Votes
Looping Cursor through columns of a Row
--cursor to loop through rows set @CursorIntermediate = cursor for select * from #tempTable Open @CursorIntermediate Fetch ...Answered | 19 Replies | 33265 Views | Created by Gopi S V - Wednesday, April 24, 2013 8:56 AM | Last reply by Chris Sijtsma - Friday, April 26, 2013 3:25 PM -
2 Votes
Getting no result while using CURSOR into a CURSOR
This statement: DECLARE GetInfo cursor local forward_only static read_only FOR SELECT COLUMN_NAME ...Answered | 3 Replies | 2524 Views | Created by ank hit - Thursday, May 31, 2012 1:16 PM | Last reply by ank hit - Thursday, May 31, 2012 1:44 PM -
1 Votes
messages not showing each cursor loop
20111125 order by date_as_bigint Open My_Cursor DECLARE @bd bigint Fetch NEXT FROM MY_Cursor INTO @bd While (@@FETCH_STATUS <> ...Answered | 1 Replies | 2476 Views | Created by tomas.t - Wednesday, January 4, 2012 4:30 PM | Last reply by Hunchback - Wednesday, January 4, 2012 7:02 PM -
0 Votes
Cursor in an infinite Loop
The best way to improve the performance is to remove the CURSOR.Answered | 3 Replies | 4470 Views | Created by VuyiswaMaseko - Tuesday, March 30, 2010 7:25 AM | Last reply by MayurGupta - Tuesday, March 30, 2010 8:49 AM -
0 Votes
Looping without loop or cursor
DECLARE @Sample1 TABLE ( Data VARCHAR(255) ); INSERT INTO @Sample1 VALUES ( '#adda' ) , ( 'bel ' ) , ( 'uh ' ) , ( ...Answered | 7 Replies | 916 Views | Created by DIEGOCTN - Tuesday, March 1, 2016 7:42 AM | Last reply by DIEGOCTN - Tuesday, March 1, 2016 1:35 PM -
3 Votes
Need to help to change from cursor to while loop in sql server
arifcse12, Im trying using while loop only but im not getting the correct output at some scenarios and in some scenarios im ...Answered | 6 Replies | 8135 Views | Created by GuruPrasas - Friday, June 3, 2011 8:55 AM | Last reply by GuruPrasas - Monday, June 6, 2011 7:10 AM -
0 Votes
Advice on applying variables as part of a statement utilising a cursor / while loop
Set @loginStr = 'CREATE LOGIN ' + '[MyDomain\' + @UserLogin + ']' +' FROM WINDOWS WITH DEFAULT_DATABASE = [master]' Permit me to point out that ...Answered | 4 Replies | 3128 Views | Created by MichaelJamesParker - Thursday, May 17, 2012 2:35 PM | Last reply by Erland Sommarskog - Thursday, May 17, 2012 5:36 PM -
0 Votes
Cursor performance
Is it legitimate to consider replacing a cursor with a While.. loop, performing a select query inside the loop ?Answered | 4 Replies | 4225 Views | Created by Jona Tec - Tuesday, May 25, 2010 12:34 PM | Last reply by Gert-Jan Strik - Tuesday, May 25, 2010 5:39 PM -
0 Votes
Cursor vs Batch
In regards to MERGE vs.Answered | 9 Replies | 1941 Views | Created by O.Ragain - Thursday, March 17, 2016 3:36 PM | Last reply by Erland Sommarskog - Thursday, March 17, 2016 11:12 PM -
0 Votes
Cursor with 2 Parameters looping
Are you looking for nested cursors?Answered | 2 Replies | 896 Views | Created by VJREDDY - Monday, July 14, 2014 6:53 PM | Last reply by Patrick Hurst - Monday, July 14, 2014 10:11 PM -
4 Votes
For or while loop
In 'for' loop - the loop executes for n number of times In 'while' loop, the loop executes while a condition is true ...Answered | 3 Replies | 1960 Views | Created by Nosyarg - Sunday, November 6, 2011 10:30 PM | Last reply by Murugan A - Monday, November 7, 2011 9:17 AM - Items 1 to 20 of 1026938 Next ›
No announcements