Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a table out of a view?

Status
Not open for further replies.

dwight1

IS-IT--Management
Aug 22, 2005
176
US
Hi All,

I have a table that i get from out source agency. It has duplicate records. In order for me to have a primary key, i have created a view (sorting out duplicate records). Now i want to convert the view into a table and then use it for my queries.

Can anyone please advise how to create a table from a view?

Thanks

Dwight
 
If the view as called X and you wanted a new table called Y

select * into Y from X order by ?

 
NoCoolHandle,

That worked like a charm. Thank you

Now that i have got the table, how do i make it dynamic. I mean it has to update (add/edit/delete of record) every time there is a change in the view called X (as per your example).

Thanks again

Dwight
 
Create one or more triggers on the view.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top