The stupid question is the question not asked | |
PerlMonks |
Re: SQL quoting problemby cadfael (Friar) |
on Oct 16, 2000 at 20:39 UTC ( [id://36954]=note: print w/replies, xml ) | Need Help?? |
For what it is worth, Sybase (related to SQL Server) will tolerate both single and double quotes in sql queries. You need to be consistent, though.
I am using Sybase ASE 12.0 and DBD::Sybase to allow users to query a full-text server that joins with another database. I put my queries into variables and escape any embedded quotes. This permits me to employ nested quotes in certain situations: The $fts string must be enclosed in single quotes, and may contain literals, which need to be enclosed in double quotes: Note that the only time I actually need to escape the quotes are when a double quote is employed within a string variable. The final form of the query passed to the Sybase server is: select a,b,c from tablea, tableb
-----
In Section
Seekers of Perl Wisdom
|
|