Nope....I think you need:I've had a look at the syntax nd I'm not sure you
can alter column names with ALTER TABLE although I may be wrong. I reckon
your best bet is to use ALTER TABLE to create a new column and insert all of
the data into it from the other column and then delete the existing column.
This can be done using a series of ALTER TABLE statements, one to create the
new column, then an insert statement to copy the data, then another ALTER
TABLE statement to drop the old field.
As I say I've never really used ALTER TABLE before so I'm not sure if it'll
work. Bear in mind that I'm talking about Transact SQL so this may not be
ANSI standard so may need some fiddling in Access
------------------------------------------------------------------
Andrew Ewings
Project Manager
Thoughtbubble Ltd
http://www.thoughtbubble.net
------------------------------------------------------------------
United Kingdom
http://www.thoughtbubble.co.uk/
Tel: +44 (0) 20 7387 8890
------------------------------------------------------------------
New Zealand
http://www.thoughtbubble.co.nz/
Tel: +64 (0) 9 419 4235
------------------------------------------------------------------
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.
-----Original Message-----
From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
Sent: 18 October 2000 11:42
To: CF-Talk
Subject: RE: Rename a column
Thanks for the reply, Andy.
> ALTER TABLE table
> { [ALTER COLUMN column_name
[snip]
> to ensure it works ok.
I appreciate what you say about SPs but this on an Access database and I've
never used SPs.
Unfortunately the machine the DB is on doesn't have Access installed (it's a
network admin thang ;-), hence the need to do this via SQL statements.
Would the SQL statement be something like (guessing here):
ALTER TABLE TableName {ADD NewColumnName AS OldColumnName} ???
--
Aidan Whitehall <[EMAIL PROTECTED]>
Netshopper UK Ltd
Advanced Web Solutions & Services
http://www.netshopperuk.com/
Telephone +44 (01744) 648650
Fax +44 (01744) 648651
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]