Skip to Content
0
Former Member
Feb 01, 2007 at 10:31 AM

SQL with parameters

15 Views

Hi all.

My problem is next: I have the next sentence with parameters:

SELECT DocNum,CreateDate,CardCode,CardName,DocTotal,ObjType FROM OINV T0 where T0.Project like '%[%0]' and T0.CreateDate >= '[%1]' and T0.CreateDate <= '[%2]'

UNION ALL

SELECT DocNum,CreateDate,CardCode,CardName,DocTotal,ObjType FROM OPCH T1 where T1.Project like '%[%0]' and T1.CreateDate >= '[%1]' and T1.CreateDate <= '[%2]'

When i run this appear the parameter window to input values.If i push in the button of 'existing values' ONLY appears the existing values of OINV table (the table that appears before the 'UNION ALL'). And if I use the UNION ALL the result is good but not appear the orange arrows, the result have that limitation. I supose if i try to transform the sql sentence IN ONE SELECT will work well.

Can i quit the button 'existing values'?but not via addon.

Any idea?

Thanks for attention.

Regards.