SQL Server Performance


Discussion in 'General Developer Questions' started by rajkolli_2000, Apr 25, 2006.

  1. rajkolli_2000 New Member

    Hi all,

    I had a scenario of using cursors, how to avoid that, is there any other alternative for
    avoiding cursors.

    My scenario: i had to get number of rows one by one at a time.

  2. Adriaan New Member

    Typically, there is no way around a cursor when you have to go through a series of records, and have to repeat a stored procedure, or some sort of dynamic T-SQL, using parameter values from each line in turn.

    Sometimes you can do stuff in a single T-SQL instruction that you may be unaware of.

    Can you describe what you're doing with the values from the cursor?
  3. Madhivanan Moderator

    Do you want count for each group?
    Post some sample data and the result you want


    Failing to plan is Planning to fail

Share This Page