Is it possible to replicate a view, and have it published to a table instead of a view?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.
No comments:
Post a Comment