Howdy,
I was told this was the place to go to for custom programming troubleshooting. We wrote the following procedure to customize gettig suggested contribution amounts for our subscrption rollover. However, it keeps coming back with "too many arguments". Is there any chance someone could let me know where this is coming from? Any assistance is appreciated!
Richard Jackson, Alley Theatre
USE
[impresario]
GO
/****** Object: StoredProcedure [dbo].[LP_GET_CONTR1] Script Date: 02/07/2011 09:24:18 ******/
SET
OFF GO SET
OFF GO
ALTER
[LP_GET_CONTR1]
(
-- @LIST_NO INT = NULL,
@CUSTOMER_NO
)
AS
Set
-- added auto CWR 8/9/2001
DECLARE
0
--SET @LIST_NO = 12
-- SET @CUSTOMER_NO = 586 -- TESTING ON M. LONG --
--SET @CUSTOMER_NO = (SELECT CUSTOMER_NO FROM T_LIST_CONTENTS WHERE LIST_NO = @LIST_NO)
/***** GET CURRENT YEAR CONTRIBUTIONS *****/
-- GET THE CURRENT FISCAL YEAR --
declare
int if
if
begin
end else
else
())
end
--select @cyfyear'CURRENT_FISCAL_YEAR'
-- GOT IT --
-- GET INDIVIDUAL GIVING --
SELECT
FROM
T_CUSTOMER A
CUSTOMER_NO
CAMPAIGN_NO
WHERE
'%Annual Individual Giving'
@CYFYEAR
GROUP
-- GET CREDITED GIVING --
CREDITEE_NO
REF_NO
-- GET LY INDIVIDUAL GIVING --
'2010 Annual Individual Giving'
-- AND D.FYEAR = @CYFYEAR-1
-- GET LY CREDITED GIVING --
MONEY SET
@CYCREDITS
@LYCREDITS
MONEY SELECT
300
@CYTOTAL
@LYTOTAL
END
'@suggested_contr_amt_1'
Sorry - that formatting was pretty FAIL... here's a better version
SE [impresario]GO/****** Object: StoredProcedure [dbo].[LP_GET_CONTR1] Script Date: 02/07/2011 09:24:18 ******/SET ANSI_NULLS OFFGOSET QUOTED_IDENTIFIER OFFGO ALTER PROCEDURE [dbo].[LP_GET_CONTR1](-- @LIST_NO INT = NULL,@CUSTOMER_NO INT)ASSet NoCount On -- added auto CWR 8/9/2001
DECLARE @CYGIVING MONEY = 0DECLARE @CYCREDITS MONEY = 0DECLARE @LYGIVING MONEY = 0DECLARE @LYCREDITS MONEY = 0
-- SET @CUSTOMER_NO = 586 -- TESTING ON M. LONG ----SET @CUSTOMER_NO = (SELECT CUSTOMER_NO FROM T_LIST_CONTENTS WHERE LIST_NO = @LIST_NO)
-- GET THE CURRENT FISCAL YEAR --declare @cyfyear int
if (month(getdate())>=7) begin set @cyfyear=year(getdate()+1) endelse begin set @cyfyear=year(getdate()) end
--select @cyfyear'CURRENT_FISCAL_YEAR'-- GOT IT --
-- GET INDIVIDUAL GIVING --SELECT @CYGIVING = SUM(B.CONT_AMT)FROM T_CUSTOMER A LEFT JOIN T_CONTRIBUTION B ON A.CUSTOMER_NO=B.CUSTOMER_NO LEFT JOIN T_CAMPAIGN D ON B.CAMPAIGN_NO=D.CAMPAIGN_NOWHERE A.CUSTOMER_NO = @CUSTOMER_NO AND D.DESCRIPTION LIKE '%Annual Individual Giving' AND D.FYEAR = @CYFYEAR AND B.REF_NO NOT IN (SELECT REF_NO FROM T_CREDITEE)GROUP BY A.CUSTOMER_NO
-- GET CREDITED GIVING --SELECT @CYCREDITS = SUM(B.CREDIT_AMT)FROM T_CUSTOMER A LEFT JOIN T_CREDITEE B ON A.CUSTOMER_NO = B.CREDITEE_NO LEFT JOIN T_CONTRIBUTION C ON B.REF_NO=C.REF_NO LEFT JOIN T_CAMPAIGN D ON C.CAMPAIGN_NO=D.CAMPAIGN_NOWHERE A.CUSTOMER_NO = @CUSTOMER_NO AND D.DESCRIPTION LIKE '%Annual Individual Giving' AND D.FYEAR = @CYFYEARGROUP BY A.CUSTOMER_NO
-- GET LY INDIVIDUAL GIVING --SELECT @LYGIVING = SUM(B.CONT_AMT)FROM T_CUSTOMER A LEFT JOIN T_CONTRIBUTION B ON A.CUSTOMER_NO=B.CUSTOMER_NO LEFT JOIN T_CAMPAIGN D ON B.CAMPAIGN_NO=D.CAMPAIGN_NOWHERE A.CUSTOMER_NO = @CUSTOMER_NO AND D.DESCRIPTION LIKE '2010 Annual Individual Giving'-- AND D.FYEAR = @CYFYEAR-1 AND B.REF_NO NOT IN (SELECT REF_NO FROM T_CREDITEE)GROUP BY A.CUSTOMER_NO
-- GET LY CREDITED GIVING --SELECT @LYCREDITS = SUM(B.CREDIT_AMT)FROM T_CUSTOMER A LEFT JOIN T_CREDITEE B ON A.CUSTOMER_NO = B.CREDITEE_NO LEFT JOIN T_CONTRIBUTION C ON B.REF_NO=C.REF_NO LEFT JOIN T_CAMPAIGN D ON C.CAMPAIGN_NO=D.CAMPAIGN_NOWHERE A.CUSTOMER_NO = @CUSTOMER_NO AND D.DESCRIPTION = '2010 Annual Individual Giving'-- AND D.FYEAR = @CYFYEAR-1GROUP BY A.CUSTOMER_NO
DECLARE @CYTOTAL MONEYSET @CYTOTAL = @CYGIVING+@CYCREDITSDECLARE @LYTOTAL MONEYSET @LYTOTAL = @LYGIVING+@LYCREDITS
DECLARE @SUGGESTED_CONTR_AMT_1 MONEYSELECT @SUGGESTED_CONTR_AMT_1 = CASE WHEN @CYTOTAL BETWEEN .01 AND 299.99 THEN 300 WHEN @CYTOTAL BETWEEN 300 AND 4999.99 THEN @CYTOTAL WHEN @CYTOTAL >=5000 THEN 0 WHEN @CYTOTAL = 0 AND @LYTOTAL BETWEEN .01 AND 299.99 THEN 300 WHEN @CYTOTAL = 0 AND @LYTOTAL BETWEEN 300 AND 4999.99 THEN @LYTOTAL WHEN @CYTOTAL = 0 AND @LYTOTAL >= 5000 THEN 0 ELSE 300 END SELECT @SUGGESTED_CONTR_AMT_1'@suggested_contr_amt_1'
Looks like @list_no has been commented out in your sp. Are you still trying to pass that when you run it? Also, are you running this through an infomaker report or directly in Management Studio?
Hi Brian - thanks for the response!
@list_no was left over from me testing the SP against a list of folks - I commented it out so that i wouldn't be required.
The procedure is being called when a subscription rollover is done to populate a suggested contribution field in T_CUST_SUBSCRIPTION_SUMMARY. My understanding was all I would need from the SP was to return a suggested contribution amount. Since our logic is farily simple, I eliminated the other data Tessitura's sample procedure called for (source_no, no_seats, season_no, etc..) and set the SP to only require a customer_no to run.
Does that help?
The parameter set should be the same as the original sample procedure. These parameters are expected (even if not used) by the application.
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Richard JacksonSent: Monday, February 07, 2011 3:24 PMTo: Ryan CrepsSubject: Re: [Tessitura Technical Forum] LP_GET_CONTR! too many arguments
From: Brian Graham <bounce-briangraham8283@tessituranetwork.com>Sent: 2/7/2011 2:14:02 PM
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!