VishalMistry
24th September 2010, 08:27
Hi,

In before.program section of a newly developed session, I want to filter data displayed based on specific date range. I am writing following in my program script:

query.extend.where(" whinh312.ardt >= " & filter.ardt.f, EXTEND_APPEND)
query.extend.where(" whinh312.ardt <= " & filter.ardt.t, EXTEND_APPEND)

I am getting following error:

Error: Illegal type combination: 'string & long'

Can anyone help, how can I specify such selection criteria.

Thanks in advance,
Vishal

Esther
24th September 2010, 14:54
It seems filter.ardt.f and filter.ardt.t are numbers, not strings. Try:


query.extend.where(" whinh312.ardt >= " & str$(filter.ardt.f), EXTEND_APPEND)
query.extend.where(" whinh312.ardt <= " & str$(filter.ardt.t), EXTEND_APPEND)

kvl8969
11th March 2014, 06:54
Is In Extend_append mode it concate two query.extend.where with "and' logical operator ?

JaapJD
11th March 2014, 09:33
Yes, EXTEND_APPEND uses the "and" operator. But you can also code the "and" operator in the where clause itself. Example:

query.extend.where("whinh312.ardt >= " & str$(utc.num()) & " and whinh312.ardt <= " & str$(utc.num() + (24*60*60)))

kvl8969
11th March 2014, 10:41
Is There Is Any Way To Concate It Using "or" operator

bhushanchanda
11th March 2014, 10:56
Hi,

As Jaap mentioned, you can write whatever statements you want OR/AND , but for concatenating conditions (strings) you need & operator.