Hello,
I was wondering if anyone has any code they would be willing to offer that would help me update our LP_CUSTOMER_RANK procedure to add 1 rank to a constituent's account for each purchase under a specific Production Season? I have a feeling it should be fairly simple, but I don't have the proper coding knowledge.
Thank you in advance!
Dan Crowell
Try something like this:
insert T_CUST_RANK (customer_no, rank_type, [rank])select a.customer_no, x as rank_type, x as rank_pointsfrom dbo.LT_TCK_HIST ajoin dbo.T_PERF b on a.perf_no = a.perf_nowhere b.prod_season_no = xxxxx and a.customer_no = @customer_no
Hi Brian, sorry for the delay, I thought I had replied the day you responded but it apparently didn't go through. I received the error: Msg 137, Level 15, State 2, Line 64 Must declare the scalar variable "@customer_no". when trying what you provided. Do you have any suggestions on what/how to modify this?