[DUG] Single or Double quotes?
Robert martin
rob at wildsoft.co.nz
Tue Dec 13 10:47:29 NZDT 2005
Hi
In Firebird single quotes are for strings, double quotes are reserved
for field names. If you put a field name in double quotes it is treated
as case sensitive. For example in an old Dbase database we ported to FB
it has the field name date, this is a reserved word, so to access it in
SQL it can be Added as "Date" and referenced as "Date", "DATE" will
however return an unknown field error.
Clear as mud?
Rob Martin
Software Engineer
phone +64 03 377 0495
fax +64 03 377 0496
web www.chreos.com
Wild Software Ltd
Phil Middlemiss wrote:
> Sometimes I can use double quotes when adding a string to an SQL query
> using Firebird with the Interbase Components. Other times I get an SQL
> error and have to resort to using single quotes (which is a pain if
> the string contains an apostrophe).
>
> Can someone set me straight on the conditions under which single or
> double quotes can be used in a query?
>
> Cheers,
> Phil.
>
>_______________________________________________
>Delphi mailing list
>Delphi at ns3.123.co.nz
>http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
More information about the Delphi
mailing list