I want to query some data using Select like so:
select tfgld102.leac, tfgld102.dbcr
where tfgld102.cono between :cono.f and :cono.t
and tfgld102.btno between :btno.f and :btno.t
and tfgld102.ttyp between :ttyp.f and :ttyp.t
and tfgld102.year = :year.f
group by tfgld102.leac, tfgld102.dbcr
order by tfgld102.dbcr, tfgld102.leac
message(enum.descr$("tfgld.dbcr", tfgld102.dbcr ) & " " & tfgld102.leac)
The problem is that while I'm sorting "tfgld102.leac", its domain is basically String, which I want to sort it as Long because it is a string containing numbers.
The result is now something like this:
I want it to be like:
. . .
I tried putting
val(tfgld102.leac) in the Order By but it gives me
Unexpected token '(' (error 302)
How can I achieve this?