Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2001
    Location
    Canada
    Posts
    45

    Question Unanswered: It is possible with cursor?

    I need to fill a cursor with 3 columns.
    A want to use a Select sprocs (for re-use de code), but this sproc return 15 columns and the 3 a need was not the 3 frist.

    Do I need to map the 15 columns with 15 variables locally? Or they have a way easier?


    Thanks
    Franky
    FBoucheros@hotmail.com

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    can u post the code? some one here might come up with a better solution

  3. #3
    Join Date
    Dec 2001
    Location
    Canada
    Posts
    45
    Code:
    DECLARE cuTEST CURSOR FOR 
    ItemsSEL
    
    OPEN cuTEST 
    
    FETCH NEXT FROM cuTEST
    INTO @col1, @col2, @col3, @col4, @col5,.....

    but I need only col2, col10 and col14
    ItemsSEL is my Strore Procedure for my complexe Select Use many place in my application ( where a need all result columns...)
    Franky
    FBoucheros@hotmail.com

  4. #4
    Join Date
    Feb 2004
    Posts
    492
    Would it be possible to redesign the ItemsSel procedure into a view? How complex is this procedure?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •