Access 2016 SQL

Arif_Tamboli

New Member
Joined
Mar 1, 2018
Messages
34
Office Version
  1. 2016
Hi
while creting VIEW in SQL getting an error "Syntax error in CREATE TABLE statement"

Below are my Query
CREATE VIEW NH_CUST AS
SELECT CUSTOMER.FirstName ,
CUSTOMER.LasName ,
CUSTOMER.Phone ,
FROM CUSTOMER
WHERE CUSTOMER.State = 'NH' ;
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Where exactly are you trying to use this code in Access?
Is it in VBA?

If it is just in SQL View of a Query, just use:
Code:
[COLOR=#333333]SELECT CUSTOMER.FirstName [/COLOR]
[COLOR=#333333]CUSTOMER.LasName,[/COLOR]
[COLOR=#333333]CUSTOMER.Phone,[/COLOR]
[COLOR=#333333]FROM CUSTOMER[/COLOR]
[COLOR=#333333]WHERE CUSTOMER.State = 'NH';[/COLOR]
and save the query with name "NU_CUST".
 
Upvote 0
That looks like non-MSAccess SQL (every database has it's own flavor of SQL). As above, views in Access are just saved queries plain and simple.
 
Upvote 0
@xenou,

I had to ponder it a little, but the Thoreau quote in your signature, is spot on.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top