August 20, 2008 at 1:52 pm
Now We use views on views and reports are running on the last views, so you can imagine reporting is very slow.
To find out if reporting is increasing I would like to create a table of one of those views.
So I used the following command:
View: V_Cars
SELECT * into Tbl_Cars FROM V_Cars.
But When I open the Tbl_Cars I only see the column headers of the view but all cells showing NULL
How is that possible?
if I run select * from V_Cars, I see all data
I also tried to run the following command:
CREATE TABLE Tbl_Cars
AS
SELECT * FROM V_Cars
But then a receive an error message saying, "incorrect syntax after AS"
Please advise me how to do this?
August 20, 2008 at 2:05 pm
You need to spend a bit more time learning how to create tables.
CREATE TABLE Tbl_Cars
AS
SELECT * FROM V_Cars
is not valid SQL. You cannot load data into a table that way.
Go to the HELP information and look up CREATE TABLE.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
August 20, 2008 at 2:24 pm
I won't find any problem with this syntax SELECT * into Tbl_Cars FROM V_Cars.
Why it's showing odd results for you.
August 20, 2008 at 3:19 pm
August 20, 2008 at 3:37 pm
My apologies but but when I first replied I missed that you had tried:
SELECT * into Tbl_Cars FROM V_Cars
Try just the select statement
SELECT * FROM V_Cars
Does it return any records?
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
August 22, 2008 at 3:10 am
SELECT * INTO New_Table_Name From Old_Table(View) will definately work properly over here.
Regards
Manoj
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply