oetjoen
5th January 2007, 08:32
Hi, Guru
I'm trying to using sql operand with where like condition with variable in my report script, here is the part of script
...
long maxno
domain tc.mcsstr5 serno
domain tc.mcsstr2 year2
year2 = sprintf$("%u(%02y)", utc.num())
serno = "0__" & year2
select cisli986.*
from cisli986
where cisli986._index1 = {:cisli205.ityp, :cisli205.idoc}
selectdo
selectempty
select max(cisli986.txno):maxno
from cisli986
where cisli986.srno like :serno
selectdo
endselect
endselect
...
I got error message from compile
Error SQL: Syntax error: ':serno' not expected
How to solve
Thanks for help
Oetjoen
I'm trying to using sql operand with where like condition with variable in my report script, here is the part of script
...
long maxno
domain tc.mcsstr5 serno
domain tc.mcsstr2 year2
year2 = sprintf$("%u(%02y)", utc.num())
serno = "0__" & year2
select cisli986.*
from cisli986
where cisli986._index1 = {:cisli205.ityp, :cisli205.idoc}
selectdo
selectempty
select max(cisli986.txno):maxno
from cisli986
where cisli986.srno like :serno
selectdo
endselect
endselect
...
I got error message from compile
Error SQL: Syntax error: ':serno' not expected
How to solve
Thanks for help
Oetjoen