# Running SQL Scripts in Access



## iknowkungfu (Mar 13, 2003)

Ok, I know you can view SQL versions of queries, but is there a way to run full blown sql scripts (for development basically) in Access?

If so, where can I find the syntax I have to use?


----------



## iknowkungfu (Mar 13, 2003)

Is this in the wrong forum? (development maybe?)
If it is, mods, please move it?

thanks


----------



## cristobal03 (Aug 5, 2005)

The Jet engine Access uses supports some SQL functions, but I don't know which ones are supported and which are not. Access supports a wide variety of database engines though; you don't have to use the Jet engine if you need a more versatile back-end. You can connect to an Oracle database, for example.

I don't feel like this answers your question...

HTH

chris.


----------



## iknowkungfu (Mar 13, 2003)

This is at work, so unfortunately, I am well and truly stuck with Access.

What I want to know is, where can I enter all of my CREATE TABLE type statements? I can't believe Access doesn't have this basic functionality.


----------



## cristobal03 (Aug 5, 2005)

You mean, you're wanting to make some saved action queries (not build on the fly)? Is the SQL View of the Query Editor (QBE) not adequate? In your database, *Create a query in Design View* and close the *Show Table* window. Then, from the menu bar, click *View-->SQL View*. You can type/paste your SQL statements into this window (I prefer it by a long shot to the WYSIWYG Query Editor).

If this doesn't answer your question, I don't know if I understand your issue? If you want to add dynamic SQL to, say, a command button on a form, you'll have to build a VBA procedure for that.

HTH

chris.


----------



## Rockn (Jul 29, 2001)

Is your backend a true SQL database or do you want to know SQL for use in VBA and Access? You can call stored procedures from Access.


----------



## iknowkungfu (Mar 13, 2003)

Cristobal, that is what I meant, thanks!
Rockn, I want to know the syntax for Jet SQL. A quick Google didn't turn up anything much.


----------



## cristobal03 (Aug 5, 2005)

Here's a list of reserved words in Jet 4.0, that might get you started.

Here's a limited collection of quicksheets about SQL, mostly as it applies to Access (under *Server Scripting* on the left, *Learn SQL*)...I don't know if that'll be any help, though.

The Access Web is a great resource. You might find answers to more specific/practical questions at the AccessVBA forums.

HTH some.

chris.


----------

