lp_update_tkt_hist customization

Hello all,

When we converted in January, we had our ticket history table (lt_tkt_hist) customized per our marketing department for list building purposes.  For conversion purposes, all worked out well.  However, we're at the point where we need to get the nightly procedure for updating this table configured.  However, I'm stumped by the error i'm continually getting.  It reads: "Cursorfetch: The number of variables declared in the INTO list must match that of selected columns."

I don't suppose there is someone out there that knows how to correct this error.  I've gone to about the limits of what I can do and comtemplated rewriting the whole SP from scratch, but would rather not reinvent the wheel.  Anyone got ideas what I should be looking for int his SP to correct the error?

Thanks!

Parents
  • Richard -

     

    There's probably something wonky in your cursor definition/use. What you should see are two steps:

    1. Declaration of cursor which will look something like

    declare mycur cursor for 

    select perf_no, perf_dt, perf_code

    and then you'll fetch information into it with 

    2. Fetch step

    fetch mycur into @perf_no, @perf_dt, @perf_code

    The things I'd check first is that all the variables in your fetch statement are properly defined and that your definition statement matches your fetch.

    Hope that makes sense!

    Heather

Reply
  • Richard -

     

    There's probably something wonky in your cursor definition/use. What you should see are two steps:

    1. Declaration of cursor which will look something like

    declare mycur cursor for 

    select perf_no, perf_dt, perf_code

    and then you'll fetch information into it with 

    2. Fetch step

    fetch mycur into @perf_no, @perf_dt, @perf_code

    The things I'd check first is that all the variables in your fetch statement are properly defined and that your definition statement matches your fetch.

    Hope that makes sense!

    Heather

Children
No Data