CREATE VIEW

  • Thread starter Thread starter David
  • Start date Start date
D

David

I'm learning SQL with MS ACCESS and my attempt to create a view is not
working...
Your assistance is appreciated. I'm good at ACCESS, just new to SQL from
scratch!

CREATE VIEW ProductCustomers
(cust_id, cust_contact) as
Select cust_id, cust_contact
from Customers;

I always get "SYNTAX ERROR with TABLE STATEMENT and VIEW is highlighted.
 
Thank you Pieter... however, even though I cut and paste your code, I still
get the same error : SYNTAX ERROR with TABLE STATEMENT

I'm using ACCESS 2003 if this helps.
Thanks again for your time and talent.
Dave
____________________________________________________________
 
Access doesn't have views. Queries essentially are the same as views, so
create a query named ProductCustomers with SQL

Select cust_id, cust_contact
from Customers;
 
Actually, that's what I was thinking. The idea with SQL VIEW is that you can
write a query that concatenates etc then use the results in other Selects...
but unless the database is gigantic, I don't see the need for a seperate VIEW
in MS ACCESS. Thanks for clarifying...
 
Maybe the easiest way is to use the Debug Immediate window:


CurrentProject.Connection.Execute "CREATE VIEW ProductCustomers AS
SELECT cust_id, cust_contact FROM Customers;"



rather that trying it in the SQL Query window.



Vanderghast, Access MVP
 
Back
Top