By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,453 Members | 3,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,453 IT Pros & Developers. It's quick & easy.

Create script in access?

RedSon
Expert 5K+
P: 5,000
Is there a way to make Access show me the SQL statement necessary to create a table that I have already defined?
Jan 2 '08 #1
Share this Question
Share on Google+
7 Replies


NeoPa
Expert Mod 15k+
P: 31,494
I don't believe Access has this feature whereby it will automatically create the SQL to reproduce an object. I know it's done in SQL Server but as far as I'm aware, it's not available in Access.
Jan 2 '08 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Is there a way to make Access show me the SQL statement necessary to create a table that I have already defined?
You can't get the SQL from the table. However, you can use the documenter feature to analyse the table structure. You could also recreate the table using the make table query feature. However, the SQL will not be standard SQL.

One other option is to Upsize the table to MS SQL. This should reproduce most of the required SQL.
Jan 8 '08 #3

NeoPa
Expert Mod 15k+
P: 31,494
...
One other option is to Upsize the table to MS SQL. This should reproduce most of the required SQL.
That's a neat idea Mary. I didn't think of that :)
Jan 8 '08 #4

RedSon
Expert 5K+
P: 5,000
You can't get the SQL from the table. However, you can use the documenter feature to analyse the table structure. You could also recreate the table using the make table query feature. However, the SQL will not be standard SQL.

One other option is to Upsize the table to MS SQL. This should reproduce most of the required SQL.
Fortunately it seems the SQL Sever Mobile is based on the Access engine. The automated Access scripts work better then common SQL queries.
Jan 8 '08 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
Fortunately it seems the SQL Sever Mobile is based on the Access engine. The automated Access scripts work better then common SQL queries.
I think that's very funny :D

Might not be the same for the CREATE TABLE query though. As Access uses a completely different syntax.
Jan 8 '08 #6

RedSon
Expert 5K+
P: 5,000
I think that's very funny :D

Might not be the same for the CREATE TABLE query though. As Access uses a completely different syntax.
Hmm, mabye its a mish-mosh of both. I know for sure that using valid SQL join syntax in SQL Server might not work in SQL Mobile. The SQL join scripts that Access produces works flawlessly every time.
Jan 8 '08 #7

jaxjagfan
Expert 100+
P: 254
Access uses "Select Into" method for creating new tables. So as the others have stated no luck there.

You can use DTS to import from Access to SQL Server to create a table. DTS has some fairly decent GUI tools for this. There may be some posts within our SQL Server forum on the specifics.

Also try 3rd party tools like "TOAD".
Jan 8 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.