Re: SQL statement in Perl doesn't work



On 27 Apr 2007 00:41:47 -0700, ikeon <shay.rozen@xxxxxxxxx> wrote:
Huub wrote:

$betaald2006 = "select betaald2006 from hvw where lidnr = $record and
naam != ' ' and kenmerk2006 is null";


Maybe the problem is in the quote inside. maybe try:

$betaald2006 = "select betaald2006 from hvw where lidnr = $record and
naam != \' \' and kenmerk2006 is null";

Or maybe not. Why do you think escaping the ' will make any
difference? Did you try it to see? You will find out that $betaald2006
contains exactly the same string, regardless.

' has no special meaning inside a double-quoted string, so there is no
need to escape it.

.