ALTER TABLE problem

aziz rasul

Active member
Local time
Today, 03:10
Joined
Jun 26, 2000
Messages
1,935
I have the following code: -

strSQL = "ALTER TABLE tmp RENAME COLUMN a TO aa;"
DoCmd.RunSQL strSQL

I get an error which says that the ALTER TABLE statement is wrong!!!!
 
I don't beleive that RENAME syntax is available in Access 2003. It was implemented in Oracle 9i.

To rename a column:
- With SQL:
- - add a new column with the same variable type
- - update it with the old data
- - drop the old column
- With VBA:
- - simply use a DAO tabledef and change the field name
 
Last edited:
That explains it. Thanks.
 

Users who are viewing this thread

Back
Top Bottom