I've having some trouble with an Output Set Element and can't figure out why it's returning the error Incorrect syntax near the keyword 'Where'.I'm trying to create an output that concatenates a string of n=[FirstName]&d=[SUMDonationAmount]This is what I have:data_select 'n=' + b.fname + '&d=' + sum(a.cont_amt)data_from (SELECT DISTINCT b.customer_no, b.fname, a.* FROM vs_contribution a JOIN t_customer b on a.customer_no = b.customer_no)data_where a.cont_dt > dateadd(yy, -1, getdate())Can anyone see where I'm going wrong?Thanks in advance,Adriana LawSydney Opera House
Hi Adriana,
In addition to what Christine said, I think you also need to convert your sum(a.cont_amt) to varchar. Something like this:
'n=' + b.fname + '&d=' + cast(sum(a.cont_amt) as varchar(10))
Thanks,David