cancel
Showing results for 
Search instead for 
Did you mean: 

SQL with parameters

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you for the reply.

With that trick the orange arrows appear but i have the same problem y the button of 'existing values', only show the existing values of the first table of the UNIONS. I can quit that button without DI/UI API????

Thanks Denis.

Former Member
0 Kudos

Hi,

You can have orange arrows only for the first table, for more functionality you must use DI/UI API.

or, try to show link for OJDT.TransID, you can see transactions for all docs

Former Member
0 Kudos

hi,

look this