Skip to Content
0
Former Member
Dec 08, 2008 at 09:35 AM

list of input values from Union

40 Views

Hi,

I want the list of all values in the input variable when we use union all.How do we get it.Pls advise.

For example you can take the below code.

SELECT T0.CardName FROM OCRD T0 where T0.Cardname = [%0]
union all
SELECT T0.CardCode FROM OCRD T0 where T0.CardCode = [%0]

In the above code the possible values for [%0] gives only cardnames and not cardcode.What we need to do

so that [%0] gives cardnames along with cardcode.

Regards,

Rajeev Manocha