• Typically, using either SCOPE_IDENTITY() function or OUTPUT clause on the initial insert.

    Can you post the DDL for the tables and an example of what data you're trying to insert? Also, are you inserting via a BCP/SSIS package from a flatfile, or are you going to be typing out the INSERT INTO command for the first table?


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA