CREATE TABLE () AS [SUBQUERY] ...can this be done

  • Thread starter Thread starter Stuart E. Wugalter
  • Start date Start date
S

Stuart E. Wugalter

Hello Folks!

Here is my simple SQL statement, which I thought would create a Table from
my query:


CREATE TABLE ORDER_NUMS (OrderNum text)
AS
SELECT DISTINCT [tbl Master Table].[Order #]
FROM [tbl Master Table];


Access 2002 does not like this syntax. Can anyone help me create a table
from a query of another table. Thanks in advance. (Hey, I am just learning
this stuff ok? :-) Please send responses to email below.

Stuart E. Wugalter
Statistician II
Zilkha Neurogenetic Institute
Keck School of Medicine
E-Mail: (e-mail address removed)
 
-----Original Message-----
Hello Folks!

Here is my simple SQL statement, which I thought would create a Table from
my query:


CREATE TABLE ORDER_NUMS (OrderNum text)
AS
SELECT DISTINCT [tbl Master Table].[Order #]
FROM [tbl Master Table];


Access 2002 does not like this syntax. Can anyone help me create a table
from a query of another table. Thanks in advance. (Hey, I am just learning
this stuff ok? :-) Please send responses to email below.

Stuart E. Wugalter
Statistician II
Zilkha Neurogenetic Institute
Keck School of Medicine
E-Mail: (e-mail address removed)


.
get the book "VBA Developer's Handbook" by Getz and
Gilbert. Chapter 4 deals with this subject
 
SELECT DISTINCT [tbl Master Table].[Order #] as OrderNum
INTO Order_Nums
FROM [tbl Master Table];
 
Back
Top