Merge In Sql 2008

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Notes on slide 1

    ETL – Extraction, Transformation & Loading of data

    Favorites, Groups & Events

    Merge In Sql 2008 - Presentation Transcript

    1. A quick introduction to the new Merge Keyword in SQL 2008
      • Basic logic behind the Merge Keyword
      • Breakdown the Syntax
      • Lets see it in action
      • Q & A
      • Next Steps
      • Senior Systems Designer for Cybner Computer Solutions who specialise in Microsoft Dynamics CRM Implementation & Integration
      • > 10 Years experience in the IT industry
      • Basic Upsert process
        • Insert New Rows
        • Update Existing Rows
        • Delete removed Rows
      • [ WITH <common_table_expression> [,...n] ]
      • MERGE
      • [ TOP ( expression ) [ PERCENT ] ]
      • [ INTO ] target_table [ [ AS ] table_alias ]
      • [ WITH ( <merge_hint> ) ]
      • USING <table_source>
      • ON <search_condition>
      • [ WHEN MATCHED [ AND <search_condition> ]         THEN <merge_matched> ]
      • [ WHEN [TARGET] NOT MATCHED [ AND <search_condition> ]         THEN <merge_not_matched> ]
      • [ WHEN SOURCE NOT MATCHED [ AND <search_condition> ]         THEN <merge_ matched> ]
      • <output_clause>
      • [ OPTION ( <query_hint> [ ,...n ] ) ]
      • ;
      • MERGE DESTINATION
      • USING (This Source Data) ON this join
      • When Matched (exists in both tables)
      • Do Something – probably Update
      • When Not Matched (A new record)
      • Do Something like Insert
      • When Source Not Matched (Row has been deleted from source table)
      • Do Something like Delete from Destination
      • OUTPUT ;
      • Solves some of the complex problems with populating a data warehouse
      • No knowledge of SSIS is needed
      • Cleaner code
      • Easy way to log the results of the Merge statement
      • Makes it easier to create data warehouses which in turn can provide a basis for better business intelligence & analysis
      • Over to you…
      • Best Resources for SQL 2008 resources:
        • Google!!! Search what you are trying to do
        • http://www.sqlservercentral.com/
        • http://msdn.microsoft.com/en-us/library/bb522522(SQL.100).aspx
        • Download the latest CTP & Start Playing!!
      • More info on me:
        • http://blog.cybner.com.au/
        • http://www.twitter.com/ceibner

    + Catherine EibnerCatherine Eibner, 2 years ago

    custom

    1241 views, 0 favs, 3 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1241
      • 1203 on SlideShare
      • 38 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 8
    Most viewed embeds
    • 34 views on http://blog.cybner.com.au
    • 3 views on http://123.200.129.69
    • 1 views on http://74.125.77.132

    more

    All embeds
    • 34 views on http://blog.cybner.com.au
    • 3 views on http://123.200.129.69
    • 1 views on http://74.125.77.132

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories