01 cond1 pic x(30).
01 var-employe pic 9(8).
move "nroemp1 = :var-employe'" to cond1
move 11111111 to var-employe
EXEC SQL
Select nroemp
into ws-nroemp
from table
where cond1
AND nroemp2 = 99999999
END-EXEC.
Select nroemp
into ws-nroemp
from table
where cond1
AND nroemp2 = 99999999
END-EXEC.
and when I compile, I get an error on the WHERE.
Could anyone help me, please?
I am hoping after the dynamic replacing my query be:
EXEC SQL
Select nroemp
into ws-nroemp
from table
where nroemp1= 11111111
AND nroemp2 = 99999999
END-EXEC.
Select nroemp
into ws-nroemp
from table
where nroemp1= 11111111
AND nroemp2 = 99999999
END-EXEC.
thanks in advance