Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Creating Materialized View

Author  Topic 

karthickbabu
Posting Yak Master

151 Posts

Posted - 2008-01-04 : 06:32:17
Hi
I want to know how to create materialized view. Is Materialized can be used in SQL SERVER 2005/2000.

I did copy a table from existing table like as below
SELECT Store_Id, City, Phone INTO BigStores FROM Stores

If I use the same Query in VIEW it shows error or INTO statement
Actually i want this in Materialized View.But i try both View and Materialized View.

In View, it shows INTO Statement is erros, Is any other way to copy a new table as per view

Kindly reply with explanation. I dont know about materialized view

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-01-04 : 06:35:33
In SQL Server, a materialized view is called Indexed View, even though you can't create table inside a view using INTO clause. Please read about indexed view in SQL Server help.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2008-01-04 : 07:23:26
Also, read up on the restrictions on the sort of SQL you can use in an indexed view. I presume you won't be doing a straight select like that (what would be the point?) so before you spend ages working through stuff check that an indexed view will work for the sort of SQL you intend to write (for example, no cross database access, no derived tables, deterministic functions only etc).
Go to Top of Page

karthickbabu
Posting Yak Master

151 Posts

Posted - 2008-01-07 : 02:05:58
Thanks for your suggestion
Go to Top of Page
   

- Advertisement -