[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Dynamic Query Variables...



I want to use this:
If $_wot = 'ALL'
        Let $_where = 'statusdate >= "[$_Min_ReportDate]" AND
statusdate <= "[$_Max_ReportDate]" AND  wopm1 LIKE "[$_wopm1]" AND
status NOT IN ("CLOSE", "CAN")'
Else
        Let $_where = 'statusdate >= "[$_Min_ReportDate]" AND
statusdate <= "[$_Max_ReportDate]" AND  wopm1 LIKE "[$_wopm1]" AND
worktype IN "[$_worktype]" AND status NOT IN ("CLOSE", "CAN")'
End-IF

SQR says it has no idea who 'statusdate' is, although statusdate is a
valid column for a table
'workorder'.

I'm trying to use it thusly:

select blah
from workorder
where [$_where]
order by [$_orderby]

Help appreciated.

Also, any idea why I *must* compile an SQT with a 'use database'
statement in setup?  I would expect SQR to log me on and use my logon
values.

-Chris