Quantcast
Channel: SCN: Message List - Data Warehousing
Viewing all articles
Browse latest Browse all 3366

Re: Start Routine - Delete Data w/ No Matching Record In Target

$
0
0

Both of these appear to do exaclty the same thing but one is in the DTP where as the other is in the start routine. Of the two (and being pretty green and not knowing better) I think I prefer the start routine since I tend to over look the logic in the DTP. Regardless I believe they pretty much follow the same logic and i need a little help with the syntax.

 

DSO 2 Start Routine:

Select Distinct Accounting document number from the target dso. This will give me a list of valid records (accounting documents) that I need to load from the second dso.

Start Routine1.jpg

Now I need to delete the records from the source package where the accounting document number is not in the list above. Im not sure if you can do a delete like this but in SQL I would do something like the following (Granted this is not valid syntax but hopefully you get the idea).

 

DELETE SOURCE_PACKAGE WHERE AC_DOC_NR Not In GT_VALID_RECORDS

 

So I have the following code in my start routine but this does not validate and not even sure you can do this. When I check the syntax it says that GT_VALID_RECS does not have the structure of a seclection table.

Start Routine2.jpg

 

So Im not sure if I can do a deletion this way or will I have to create a loop and loop over each record and delete the records 1 by 1?

 

Thanks


Viewing all articles
Browse latest Browse all 3366

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>