Create table in SQL view (1 Viewer)

jhartford

Registered User.
Local time
Yesterday, 19:55
Joined
Oct 24, 2008
Messages
12
I'm using Access 2007. In SQL view, I'm not able to create tables. But I can do select query in SQL view.

Do I need to set up something in order to create table in SQL view?

Thanks a lot
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 03:55
Joined
Jul 9, 2003
Messages
16,287
I'm using Access 2007. In SQL view, I'm not able to create tables. But I can do select query in SQL view.

Do I need to set up something in order to create table in SQL view?

Thanks a lot

Do you mean you want to create a function which you can run which will create a table based on an SQL string?
 

wiklendt

i recommend chocolate
Local time
Today, 12:55
Joined
Mar 10, 2008
Messages
1,746
the question is not whether you *can* create tables, it's whether you *should* create tables. this sounds like a normalisation issue to me, more than a coding one...

can you perhaps explain why you want to create tables, then we can help you to find a better way to organise your data.
 

jhartford

Registered User.
Local time
Yesterday, 19:55
Joined
Oct 24, 2008
Messages
12
Thanks for all your responses.

Should I be able to create table at SQL view instead of query disign view with the following code?

create table Contract (
C_Name text(50) primary key not null
)

The msg popped up: The query must have at least one destination field

Thank you very much
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 22:55
Joined
Jan 23, 2006
Messages
15,385
I don't have acc2007, but in 2003, in order to create a table, you have to be in sql mode/view and you have to identify that you want to do a Data Definition Query.

But as others have asked -- Should you be doing so???
 

Users who are viewing this thread

Top Bottom