[DUG] Single or Double quotes?
Kyley Harris
kyleyharris at gmail.com
Tue Dec 13 09:39:12 NZDT 2005
double quotes are normally allocated for field names. strings are single.
pass your data as a param and save yourself the concern of it being a pain.
eg
'where x = ''tod'' ';
to
'where x = :Filter'
parambyname('filter') := mydata
it will become more readable also.
I'm sure I am stating the obvious, but ....
On Tue, 13 Dec 2005 09:28:59 +1300, Phil Middlemiss <phil at tumonz.co.nz>
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.
--
Kyley Harris
+64-21-671821
More information about the Delphi
mailing list