Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

understanding the load_Transform_salescreditcard script Expand / Collapse
Posted Tuesday, March 30, 2010 3:13 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 12, 2010 3:12 PM
Points: 27, Visits: 36
Hi there,
I am trying to understand what the update does in this load script. In the above zip file I have created a staging table, loaded the sales credit data into it using an SSIS from the Adventure works database (a sample microsoft sql database). The way I understand is that the load script inserts new records that are NOT in the transform table but ARE in the staging table (ie:hence a right join where is null). However I don't really understand what the update function above is doing. Is it closing off the record by setting dateto=today's date??? but why is there a left join hence. I also can't see anywhere in the final table where the 'update' is working.

thanks Craig

  Post Attachments 
SQL (3 views, 12.89 KB)
Post #892556
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse