[DUG] SQL Keywords

Gajo Csaba csaba at enyem.com
Thu Jan 18 14:19:26 NZDT 2007


I've just tried this and it works:

select t."date" from testdb t

So you mention the table name, but only the field name is in quotes.  
Explanation on this page:
http://info.borland.com/devsupport/sqllinks/text/ti2718.txt

Csaba


On Thu, 18 Jan 2007 02:04:03 +0100, Eion McIntosh (Christchurch)  
<e.mcIntosh at ppcs.co.nz> wrote:

> Yes I've tried quotes and "DATE" as FileDate and both have been rejected.
>
> -----Original Message-----
> From: delphi-bounces at ns3.123.co.nz
> [mailto:delphi-bounces at ns3.123.co.nz]On Behalf Of Struan Judd
> Sent: Thursday, 18 January 2007 1:33 p.m.
> To: 'NZ Borland Developers Group - Delphi List'
> Subject: RE: [DUG] SQL Keywords
>
>
> Eion,
>
> The other SQL standard for quoting keywords when using them as names is  
> the
> double quote (").
>
> Have you tried that?
>
> TTFN, Struan
>
> Eion McIntosh (Christchurch) wrote:
>> Hi
>>
>> We have on app using Dbase tables, created sometime ago, which we
>> need to do a new query over one of the tables. I'm using the TQuery
>> compenent but have struck a snag in that one of the fields we want to
>> query is called DATE and the component does not like DATE because it
>> classed as a keyword.
>>
>> Is there anyway to change to query so we can query over the DATE
>> field without having to rename it throughout the whol application?
>>
>> I know in SQL itself you can put squarebrackets around the fieldname,
>> [DATE], to overcome this issue but the TQuery component doesn't like
>> that either.
>>
>> Regards
>> Eion McIntosh
>> PPCS Ltd
>
>
>
> Struan Judd
> Mailto:struan.judd at ecargo.co.nz Developer
> Phone:   +64 (9) 368 9368 eCargo
> Fax:     +64 (9) 368 9369 Visibility - Communication - Measurement
> Mobile:  +64 (21) 685 335 Private & Confidential
> http://www.ecargo.co.nz
>
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


More information about the Delphi mailing list