SQL Dependency or Change data capture

  • Can anyone tell me how can i implement sql dependency?

    my task is:

    I have a 3 tables which have only rowIDs as unique id/primary key.

    New rows are inserted/updated evey second in these tables.

    Now i want to club data from all these three tables into single table

    and on this single table to show records to user.

    my question is how can we fetch incremental records from these 3 tables into a single table.

    i dont want to use trigger.

    although currently i am doing it with a store procedure with the help of max rowid Fetched .........

    can i do it with sql dependency or change data capture so that whenever any rows added or updated it will intimate us on real time basis..

    [font="Arial Narrow"]Failure is not the worst thing. The worst Thing is not to try[/font]
  • replication can be an alternative

    Online Trainer For SQL DBA and Developer @RedBushTechnologies with 18 yrs exp.

  • why not use a VIEW that is nothing more than a UNION ALL of the three tables in question?

    then the view will never be out of sync, and will have all the data you need at the instant you query it.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell (6/30/2010)


    why not use a VIEW that is nothing more than a UNION ALL of the three tables in question?

    or you might need to use JOINs to get related data into VIEW.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 4 posts - 1 through 3 (of 3 total)

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