In ADS I can select
cQuery:="Select * from Mydbf d where d.somedate>='"+Date2SQLDate(dFrom)+"' AND d.somedate<='"+Date2SQLDate(dTo)+"' "
cQuery+="AND d.relation='"+cRel+"' "
in which case I get records within the given date range for this (1) relation (e.g. client) only.
I however do have a selection of relation keys in an array aRelations. But this won't work as 2nd line:
cQuery+="AND ascan(SELF:aRelations,d.relations)<>0"
Is there a way to achieve that?
Dick
ADS SQL statement to check in array
ADS SQL statement to check in array
Hi Dick,
I would transform the content of self:aRelations to a SQL array and write:
cQuery += " and d.relations in ( x, y, z, ... )"
For such uses I have a function Array2SQLList().
Wolfgang
I would transform the content of self:aRelations to a SQL array and write:
cQuery += " and d.relations in ( x, y, z, ... )"
For such uses I have a function Array2SQLList().
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ADS SQL statement to check in array
Hello Wolfgang,
Yes, that work, thanks a lot! I wasn't aware of SQL arrays until your reply.
Dick
Yes, that work, thanks a lot! I wasn't aware of SQL arrays until your reply.
Dick