Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003

    Unanswered: replication of a view

    Is it possible to replicate a view, and have it published to a table instead of a view?

  2. #2
    Join Date
    Feb 2003
    Auckland, NZ
    I am not sure exactly what you mean.

    Do you want the records in the view to be appended to an existing table or do you want to create a new table?

    TO append use INSERT INTO

    To create a new table from the view:

    Inserting Rows Using SELECT INTO
    The SELECT INTO statement creates a new table and populates it with the result set of the SELECT. The structure of the new table is defined by the attributes of the expressions in the select list, for example:

    SELECT Shippers.*, Link.Address, Link.City,
    Link.Region, Link.PostalCode
    INTO NewShippers
    FROM Shippers
    JOIN LinkServer.DB.dbo.Shippers AS Link
    ON (Shippers.ShipperID = Link.ShipperID)

    SELECT INTO can be used to combine data from several tables or views into one table. It can also be used to create a new table containing data selected from a linked server.
    JJ Kennedy
    Double J IT Solutions

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

Posting Permissions

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