PC Review


Reply
 
 
David
Guest
Posts: n/a
 
      14th Jul 2009
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.


 
Reply With Quote
 
 
 
 
David
Guest
Posts: n/a
 
      14th Jul 2009
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
____________________________________________________________

"PieterLinden via AccessMonster.com" wrote:

> David wrote:
> >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.

>
> CREATE VIEW ProductCustomers AS
> SELECT cust_id, cust_contact
> FROM Customers;
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200907/1
>
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      14th Jul 2009
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;


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"David" <(E-Mail Removed)> wrote in message
news:4FE509E6-E44E-44FB-B2FF-(E-Mail Removed)...
> 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
> ____________________________________________________________
>
> "PieterLinden via AccessMonster.com" wrote:
>
>> David wrote:
>> >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.

>>
>> CREATE VIEW ProductCustomers AS
>> SELECT cust_id, cust_contact
>> FROM Customers;
>>
>> --
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/For...dules/200907/1
>>
>>



 
Reply With Quote
 
David
Guest
Posts: n/a
 
      14th Jul 2009
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...

"Douglas J. Steele" wrote:

> 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;
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "David" <(E-Mail Removed)> wrote in message
> news:4FE509E6-E44E-44FB-B2FF-(E-Mail Removed)...
> > 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
> > ____________________________________________________________
> >
> > "PieterLinden via AccessMonster.com" wrote:
> >
> >> David wrote:
> >> >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.
> >>
> >> CREATE VIEW ProductCustomers AS
> >> SELECT cust_id, cust_contact
> >> FROM Customers;
> >>
> >> --
> >> Message posted via AccessMonster.com
> >> http://www.accessmonster.com/Uwe/For...dules/200907/1
> >>
> >>

>
>
>

 
Reply With Quote
 
vanderghast
Guest
Posts: n/a
 
      14th Jul 2009
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


"David" <(E-Mail Removed)> wrote in message
news:4FE509E6-E44E-44FB-B2FF-(E-Mail Removed)...
> 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
> ____________________________________________________________
>
> "PieterLinden via AccessMonster.com" wrote:
>
>> David wrote:
>> >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.

>>
>> CREATE VIEW ProductCustomers AS
>> SELECT cust_id, cust_contact
>> FROM Customers;
>>
>> --
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/For...dules/200907/1
>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I use CREATE VIEW? Mette Dencker Microsoft Access 18 1st Nov 2006 08:12 PM
CREATE VIEW witek Microsoft Access Queries 7 12th Oct 2006 03:51 PM
how to do create view from VA in adp Jerry Qu Microsoft Access ADP SQL Server 3 28th Dec 2004 06:00 PM
Create View with ADO.NET Zack Sessions Microsoft VB .NET 10 9th Jul 2004 04:43 PM
CREATE VIEW? dwa Microsoft Access Queries 1 25th Feb 2004 08:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:36 AM.