fiogf49gjkf0d
Hi
Is there a way of updating multiple tables in one ExecuteSQL script?
I can achieve this by adding in seperate Execute SQL tasks for each table I need to update, but was wondering if there was a way of updating a few tables at once, I thought it might have been easy as adding a begin and commit transaction to achieve this but obviously not:
This is what I have so far which gives me an error on the system's ExecuteSQL sub routine:
strSQL = "BEGIN TRANSACTION " & _ "UPDATE DCLACCLOA SET GAS_DATETOCUSTOMER = NULL, LOA_SUBMITTEDBY = NULL, GAS_LOAOBTAINEDDATE = NULL WHERE accountid IN (" & strAcctID & ") " & _ "UPDATE ACCOUNT SET LEADSOURCEID = 'L6UJ9A00006I', alloc_data_type = 'ENRG' WHERE accountid IN (" & strAcctID & ") " & _ "COMMIT " objSLXDB.ExecuteSQL(strSQL)
I can update the tables individually but was wondering if this could be done in one go?
Can anyone advise?
Thanks
Dave
|