Article View: borland.public.interbase.sql
Article #401Change a field name that is a reserved word
From: Scott Leake
Date: Thu, 28 Feb 2008 01:47
Date: Thu, 28 Feb 2008 01:47
14 lines
1651 bytes
1651 bytes
I am converting an Interbase 5.6 database that contains column names that are reserved words in IB2007. It was backed up in IB5.6 and restored into IB2007 with no problem. If I use IBConsole and manually alter the column name and save, it works. But I need to automate this process, so I am trying to use ALTER TABLE mytable ALTER colname TO newname But because it is a reserved word, it doesn't like the command. (One of the column names in question is "type"). I have tried several things but can't seem to get it to work. Is there a way to get Interbase to accept this, at least enough to allow me to change the name to something that isn't a reserved word?
Technical Details
Message-ID:
<C3EB7CF4.80BC%sleake@gmail.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,12d183e78a7d5da7,start X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit User-Agent: Microsoft-Entourage/11.4.0.080122 Date: Wed, 27 Feb 2008 20:47:48 -0500 Subject: Change a field name that is a reserved word From: Scott Leake <sleake@gmail.com> Newsgroups: borland.public.interbase.sql Message-ID: <C3EB7CF4.80BC%sleake@gmail.com> Thread-Topic: Change a field name that is a reserved word Thread-Index: Ach5q+umKnppouWfEdy4/wAWy5+PFw== Mime-version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit NNTP-Posting-Host: 72.84.195.233 X-Trace: newsgroups.borland.com 1204163267 72.84.195.233 (27 Feb 2008 17:47:47 -0700) Lines: 15 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail X-Original-Bytes: 1490