Using an Excel OCBC SQL execute - Can you run multiple update statements to update entries in a Table?

Using excel 2019, Sage CRE 300 18.2

I want to update hundreds of payrates via script instead of plugging each one in via user interafce.

Tested this and it works fine for 1 update:

UPDATE PRS_SYSTEM__PAY_RATE_TABLE SET Rate = 25.00 WHERE Pay_Table_Key = 'CLAYTONJ' ;

But trying to update multiple lines in the one query fails: (this pretty standard for a MSSQL database script):

UPDATE PRS_SYSTEM__PAY_RATE_TABLE SET Rate = 25.00 WHERE Pay_Table_Key = 'BLOGGSJ';

UPDATE PRS_SYSTEM__PAY_RATE_TABLE SET Rate = 30.00 WHERE Pay_Table_Key = 'SMITHA';

Is it just becasue the ODBC query execution is too primative using excel and does not parse each line?

Any help appreciated.

Parents Reply Children
No Data