Progress Equivilent of SQL

mostricki

New Member
Hello all,
I am not real familiar with Progress, but i do have some DB programming experiance in T-SQL.

I have a project where i need to change a field for particular customers. There is no common field that i could use to group them. I have a list of customer numbers and a list of what the field should be for each customer number. I know in SQL the update statement would look something like this:

update [customer_table]

set [customer_table].[salesnumber] = 'T23'
where [customer_table].[customer id] In (12345,12346,12347,14234,17423,12784,......)

I do have a small statement that we use do this on a small scale and that looks something like this:

for each cust where cust.cono=1
and cust.custid = "12345".

cust.slsno = "T23".


I would appreciate any help on this matter as it will take me a couple days to do this account by account.

Thanks in advance.
 
/* Ex. 1.- Customers to change in a variable */
DEF VAR lista AS CHAR INITIAL '12345,12346,12347,14234,17423,12784'.
FOR EACH customer_table.
IF LOOKUP (STRING(custid),lista) > 0 THEN
customer.slsno = "T23".
END.
/* Ex. 2.- Customers to change in a text file (one per row)*/
INPUT FROM lista.txt.
DEF VAR t_cust AS INT.
REPEAT:
IMPORT t_cust
FIND customer_table WHERE
customer.custid = t_cust NO-ERROR.
IF AVAILABLE customer THEN customer.slsno = "T23".
END.
 
Back
Top