I'm running an extract from a SQL Server table. Before I load into my destination table, I want to remove any keys in the destination table that have a match in the work table (W8T0KH11) I produced from my extract task.
The destination table has a PK on 'TransactionKey'. If I don't run the deletion, the proc append that is run in the Table Loader errors due to the key already existing. The reason I want to delete and re-append is because the rows have been updated at source.
In the delete task, I have said where W8T0KH11.TransactionKey = DirectoryBaskets.TransactionKey. This fails when I try to run the delete stating "ERROR: Unresolved reference to table/correlation name W8T0KH11."
I'm of the opinion that for some reason the work table is not being created before I try to run the delete. From the log it is defined and then immediately moves to process delete.
I want to have these deletions run before the table loader and appreciate any pointers.
Flow screenshot :
Hi,
Thanks for the response.
If you mean the Update/Insert Load style, I found this was performing individual loops per row. I have 700k+ rows to analyse and it was taking far too long (and had run up some impressive size logs).
.... actually looks like that was due to the technique I was using. Modify by index looks OK.
Thanks
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.