Article View: borland.public.interbase.sql
Article #402Re: Change a field name that is a reserved word
From: Jeff Overcash (TeamB)
Date: Thu, 28 Feb 2008 02:38
Date: Thu, 28 Feb 2008 02:38
28 lines
2173 bytes
2173 bytes
Scott Leake wrote:
> 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?
>
You need to double quote the reserved words. Remember this makes it case
sensitive so make sure the column is all caps.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted corridors of Whitehall.
(Fish)
Technical Details
Message-ID:
<47c61ec2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<C3EB7CF4.80BC%sleake@gmail.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,12d183e78a7d5da7 X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 27 Feb 2008 21:38:59 -0500 From: "Jeff Overcash (TeamB)" <jeffovercash@mindspring.com> Organization: TeamB User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 Newsgroups: borland.public.interbase.sql Subject: Re: Change a field name that is a reserved word References: <C3EB7CF4.80BC%sleake@gmail.com> In-Reply-To: <C3EB7CF4.80BC%sleake@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 66.32.252.107 Message-ID: <47c61ec2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1204166338 66.32.252.107 (27 Feb 2008 18:38:58 -0700) Lines: 28 X-Authenticated-User: overcash Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail