[DUG] SQL Keywords

Conor Boyd Conor.Boyd at trimble.co.nz
Thu Jan 18 14:24:38 NZDT 2007


I'm not sure this is a solution either (I'm not doing DB stuff anymore),
but it's another suggestion anyway.
 
Prefix the quoted keyword with the table name?
 
As in:
    select table."DATE" from table where...
 
C.

________________________________

From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]
On Behalf Of Eion McIntosh (Christchurch)
 
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  

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.  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20070118/b6edcd7f/attachment-0001.html


More information about the Delphi mailing list