sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: using sybperl, how to insert data that contains a quote with in it
Date: Jan 5 2001 3:53PM
Klein, Shoshana R writes:
> Below is my sql statement to insert data into a table.
> the variable $in_name contains on occasion a single quote for example john
> o'brien.
Double the quotes that you want to escape:
$in_name =~ s/'/''/g;
Michael
--
Michael Peppler - Data Migrations Inc. - mpeppler@peppler.org
http://www.mbay.net/~mpeppler - mpeppler@mbay.net
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|