ADS SQL statement to check in array
Posted: Sun Sep 12, 2021 8:16 am
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
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