database relationships

  • i have master tables in one database and child table in one database, but no relationship between them, need to check all the changes done in child table through master table??????

  • what kind of changes you want to see in child table

    please give more focus on what you want

  • if any insertions are done then the inserted data and modified id should be automatically generated in master table

  • then use trigger(After Insert) on child table which handle master table.

  • ch.omkarreddy (11/21/2012)


    if any insertions are done then the inserted data and modified id should be automatically generated in master table

    It can be done with a cross-schema trigger, but that is generally not recommended as a best practice.

    How synchronized do the updates need to be? If you can live with synchronizing every hour or so, you could do it with a background process.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St

  • yeah planned about same one thanks but could you please provide me a query as i am a beginner in sql server

  • update are synchronized in 6 hours format and using index also smells good to taste

  • ch.omkarreddy (11/21/2012)


    yeah planned about same one thanks but could you please provide me a query as i am a beginner in sql server

    You need to provide DDL and sample data in a consumable form for anyone to work up an example.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply