Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)

  • RE: CURSOR - running very slow

    Thanks

  • RE: CURSOR - running very slow

    it working fine now. Let me work on other steps. Thanks to everyone who suggested the code improvement.

  • RE: CURSOR - running very slow

    Here is code which has been suggested: I need the incremental value of log_seqno. How to compute vr_seqno incrementally.

    ffhand i think this would do it in a single shot, but...

  • RE: CURSOR - running very slow

    Here is the updated code: Still this is running slow.

    DECLARE @log_id INT

    DECLARE @vr_seqno INT

    DECLARE @getlogid CURSOR

    SET @getlogid = CURSOR FOR

    SELECT log_id

    FROM [testdb].[dbo].[match_event_log]

    OPEN @getlogid

    FETCH NEXT

    FROM @getlogid INTO @log_id

    WHILE @@FETCH_STATUS = 0

    set...

  • RE: CURSOR - running very slow

    I have included the where caluse :

    where log_timestamp_dt between '2010-01-01 00:00:00.000' and '2010-02-28 00:00:00.000'

    order by log_idlog_timestamp_dt between '

    I want to increament the log_seqno. So I am using the vr_seqno=@vr_seqno +...

  • RE: CURSOR - running very slow

    Here is the modified code:

    DECLARE @log_id INT

    DECLARE @vr_seqno INT

    DECLARE @getlogid CURSOR

    SET @getlogid = CURSOR FOR

    SELECT log_id

    FROM [testdb].[dbo].[match_event_log]

    OPEN @getlogid

    FETCH NEXT

    FROM @getlogid INTO @log_id

    WHILE @@FETCH_STATUS = 0

    BEGIN

    PRINT @log_id

    set @vr_seqno = @vr_seqno +...

  • RE: CURSOR - running very slow

    I want to increment vr_seqno by 1. this query will increment vr_seqno?

    Update [CAMINO].[dbo].[match_event_log]

    set log_seqno = vr_seqno

    FROM (select

    ...

  • RE: CURSOR - running very slow

    Here is the code. This is my first step in the process and after this seq_no update I need to update some other columns based on this seq_no.

    USE [TESTDB]

    GO

    /******...

Viewing 8 posts - 1 through 8 (of 8 total)