Reply to Problem with simple cursor

Your name:

Reply:


Posted by Jimbo on 10/20/05 00:02

I have a cursor here that appears to never stop running even though the
record set that populates it is only 22 records

heres the code:

declare cursorfinal cursor for
select appointmenteffdate, appointmentDuration, provideroid from @main

open cursorfinal

FETCH NEXT FROM cursorfinal
INTO @aff, @duration, @poid

WHILE @@FETCH_STATUS = 0
BEGIN

delete from @main_temp where (appointmenteffdate between @aff and
dateadd(minute, @duration , @aff) or
dateadd(minute,appointmentduration,appointmenteffdate ) between @aff
and dateadd(minute, @duration , @aff))
and provideroid = @poid
select @poid

END

CLOSE cursorfinal
DEALLOCATE cursorfinal

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация