Output Set Error Question

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 Law
Sydney Opera House

Parents Reply Children
No Data