Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am not very experienced with SQL.

Status
Not open for further replies.

kelly27

Technical User
May 10, 2003
2
US
I am not very experienced with SQL. Can anyone tell me why I keep getting a syntax error with the code below?

CREATE VIEW thisview as
select sales_amount from
labor_table;
 
I presume given the forum this is an Access database. Access doesn't have views as such, they are called queries in Access speak.
Go to the Query tab or menu depending on your version, create a new one and put the code:

select sales_amount from
labor_table;

in and save it as thisview.

This is the Access equivalent of what your SQL does.

John
 
Small qualification to John's post above. Access does have views if your database is created as an "ADP project". This feature is available in Access 2000 and above

An ADP database is an Access client application which is distinct to a .mdb format, and hosts its data in a 'native' manner on SQL Server. As such, it has direct visibility to the views hosted in a SQL Server database.

You may find that the Microsoft Access Project forum is appropriate and/or one of the SQL Server forums.

Hope this helps,

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top