Output set error

Former Member
Former Member $organization

Hello,

I have been trying to create an output set element, and when I try to run it, it gives me this error:

Incorrect syntax near the keyword 'Where'

Here is my tr_query_element setup: 

Select: sum(tot_amt_due)

From: (select customer_no, tot_amt_due, appeal_no, source_no as 'source_no1' from t_order)

Where: appeal_no=(<<p12>>) and source_no1<>(<<p13>>)

Any thoughts? I'm still a bit green when it comes to creating output set elements so any help is greatly appreciated.

Thanks!

Parents
  • Michael -

    When you have quotes () around parameters you are telling SQL that you are anticipating multiple values in the parameter.

    So you could either keep the quotes and change it to:

    Where: appeal_no in (<<p12>>) and source_no1 not in (<<p13>>)

    Or, if your parameter will only ever contain one value you'd change it to:

    Where: appeal_no= <<p12>> and source_no1<> <<p13>>

     

    See if that helps!

    Heather


Reply
  • Michael -

    When you have quotes () around parameters you are telling SQL that you are anticipating multiple values in the parameter.

    So you could either keep the quotes and change it to:

    Where: appeal_no in (<<p12>>) and source_no1 not in (<<p13>>)

    Or, if your parameter will only ever contain one value you'd change it to:

    Where: appeal_no= <<p12>> and source_no1<> <<p13>>

     

    See if that helps!

    Heather


Children