[DUG] Adding Field to Table in SQL
James Sugrue
jamessugrue at xtra.co.nz
Mon May 29 19:10:50 NZST 2006
Oh cool. Will try. thanks
-----Original Message-----
From: "Brian Wrigley" <bswrigley at xtra.co.nz>
To: "NZ Borland Developers Group - Delphi List" <delphi at ns3.123.co.nz>
Sent: 29/05/06 18:26
Subject: Re: [DUG] Adding Field to Table in SQL
----- Original Message -----
From: James Sugrue
To: 'NZ Borland Developers Group - Delphi List'
Sent: Monday, May 29, 2006 5:40 PM
Subject: [DUG] Adding Field to Table in SQL
Is it possible to add a field to a paradox table called Active using SQL.
In the BDE? Yes. eg:
alter table ":dbdemos:test.db"
add "test.db"."Active" boolean
That weird syntax "file name including extension"."field name" is the BDE's way of letting you specify fields that are reserved words, contain illegal characters etc.
A similar example: to create a file with an illegal field:
create table ":dbdemos:test.db"
(id numeric(6),
"test.db"."Active" boolean)
I.E Alter table <x> add column Active Boolean
Active is of course a reserved word. I know this - pity the developer I inherited the system from didn't. I have tried 'Active', "Active" and even [Active] but to no avail.
More information about the Delphi
mailing list