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
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to