Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010
    Posts
    7

    Unanswered: Replication of VIEWS in sql 2005

    (DB 1)10 tables - (VIEW of some columns)2 columns -
    (DB 2)10 tables - (VIEW of some columns)2 columns - } [ combine all the views ]
    (DB 3)10 tables - (VIEW of some columns)2 columns -

    There are 10 tables in each DB. I created a view with 2 columns from multiple tables in each database. Now each DB has a view. I need to replicate all these view to another database as single view

    Is this possible
    so how to combine these views in SQL Server 2005 ? (whether to use join or Union, or can i map graphically)

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Yes, you can JOIN, UNION, or graphically map the contents of a VIEW.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Oct 2010
    Posts
    7
    but how to do it.....

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Do which?

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  5. #5
    Join Date
    Oct 2010
    Posts
    7
    can u show me the sample query of joining views?

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    SELECT *
       FROM view1
       JOIN view2
          ON (view2.primaryKey = view1.primaryKey)
    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •