Board index » delphi » Local SQL & Paradox field names

Local SQL & Paradox field names

I am trying to use Local SQL to create my Paradox files.  
I put in the following command and get an error.

Create Table "ACCESS.DB"
(
"SYSTEM NUMBER" NUMERIC(10,2),
"MENU OPTION" NUMERIC(10,2),
Primary Key("SYSTEM NUMBER", "MENU OPTION")
)

After playing around with it, it looks like Local SQL doesn't like the
double-quotes around the field names.  However, my database fields commonly
have spaces in them (Legacy database).  Is there anyway to do this in Local
SQL?  I can access these fields through a TQuery components so it seems
like I should be able to create them as well.

Thanks
Richard Speiss

 

Re:Local SQL & Paradox field names


Try:

Create Table "ACCESS.DB"  A
(
A."SYSTEM NUMBER" NUMERIC(10,2),
A."MENU OPTION" NUMERIC(10,2),
Primary Key(A."SYSTEM NUMBER", A."MENU OPTION")
)

Bill

(Sorry but TeamB cannot answer support questions received via email.              )
(To send me email for any other reason remove .nospam from my address.)

Re:Local SQL & Paradox field names


That gave me 'Invalid use of keyword.  Token A' so I guess it doesn't like
aliases either.

Quote
> Try:

> Create Table "ACCESS.DB"  A
> (
> A."SYSTEM NUMBER" NUMERIC(10,2),
> A."MENU OPTION" NUMERIC(10,2),
> Primary Key(A."SYSTEM NUMBER", A."MENU OPTION")
> )

Other Threads