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!
Sounds to me like there might be a mismatch between the fields/variables specified in the select statement and the fields/variables listed in the INTO statement in the procedure.??
Penny Tabor
IT Manager
Midland Center for the Arts
Midland, MI 48640
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Richard Jackson Sent: Wednesday, June 01, 2011 12:48 PM To: Tabor, Penny Subject: [Tessitura Technical Forum] lp_update_tkt_hist customization
This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!
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
Thanks Heather,
I never use cursors myself and this script I think is just not working with our customized ticket history table and screen. Thanks for the tip – I’ll start looking for declare statements that don’t match a fetch statement. Do you know if they need to be in the same order as the declare/select statement in the fetch or can I just add them at the end?
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Heather Kraft Sent: Wednesday, June 01, 2011 3:14 PM To: Richard Jackson Subject: Re: [Tessitura Technical Forum] lp_update_tkt_hist customization
selectperf_no, perf_dt, perf_code
From: Richard Jackson <bounce-richardjackson6492@tessituranetwork.com> Sent: 6/1/2011 11:45:48 AM