Hi, I am new to Progress and I need to convert the following SQL query into progress 4GL language:
update table1
set col1 = 2,
col2 = getdate()
where col1 = 3
Thanks in advance.
/*Single Find*/
find first table1 exclusive-lock
where table1.col1 = 3 /* If col1 data type is character then 3 needs to be quoted '3'...*/
no-error.
if available table1 then
do:
assign
table1.col2 = getdate()
table1.col1 = 2.
end.
/*Multiple Finds*/
For each table1 exclusive-lock
where table1.col1 = 3:
assign
table1.col2 = getdate()
table1.col1 = 2.
end.
update table1
set col1 = 2,
col2 = today
where col1 = 3