Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Nathan Gross
On 12/21/05, Mark Matthews <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Nathan Gross wrote: > > On 12/21/05, Hassan Schroeder <[EMAIL PROTECTED]> wrote: > >> Nathan Gross wrote: > >> > /* hint: java.sql.PreparedStatement */ > >>> I thought we are talking a

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nathan Gross wrote: > On 12/21/05, Hassan Schroeder <[EMAIL PROTECTED]> wrote: >> Nathan Gross wrote: >> /* hint: java.sql.PreparedStatement */ >>> I thought we are talking about a mysql specific function, which would >>> not be in the vanilla j

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Nathan Gross
On 12/21/05, Hassan Schroeder <[EMAIL PROTECTED]> wrote: > Nathan Gross wrote: > > > Woa! Let me verify. If I pass a qry string: > > "SELECT Anyfield from Anytable where Anyfield = 'The man was 100% correct' > > " > > to a Connector/J Statement (or PreparedStatement via parameters), the > > drive

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Hassan Schroeder
Nathan Gross wrote: > Woa! Let me verify. If I pass a qry string: > "SELECT Anyfield from Anytable where Anyfield = 'The man was 100% correct' " > to a Connector/J Statement (or PreparedStatement via parameters), the > driver will automatically [behind the scenes] escape the percent sign? Again,

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Nathan Gross
On 12/21/05, Hassan Schroeder <[EMAIL PROTECTED]> wrote: > Nathan Gross wrote: > > >>/* hint: java.sql.PreparedStatement */ > > > > I thought we are talking about a mysql specific function, which would > > not be in the vanilla j2se/j2ee pkg's. Actually, you know, I don't > > even know exactly wh

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Hassan Schroeder
Nathan Gross wrote: >>/* hint: java.sql.PreparedStatement */ > > I thought we are talking about a mysql specific function, which would > not be in the vanilla j2se/j2ee pkg's. Actually, you know, I don't > even know exactly what function I need to be looking for! We're talking about escaping c

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Nathan Gross
On 12/21/05, Hassan Schroeder <[EMAIL PROTECTED]> wrote: > Nathan Gross wrote: > > >>Nearly every mysql client library has some kind of function to perform this > >>escaping for you. Please refer to the manual of the client library you are > >>using to see if your client has it or if it escapes con

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Nathan Gross
On 12/21/05, JamesDR <[EMAIL PROTECTED]> wrote: > Nathan Gross wrote: > > > > > > > I get two lists from different sources which I merge into the database > > via a Java program. Since these two lists themselves sometimes get > > their data from the same source, my program first does a SELECT on t

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Hassan Schroeder
Nathan Gross wrote: >>Nearly every mysql client library has some kind of function to perform this >>escaping for you. Please refer to the manual of the client library you are >>using to see if your client has it or if it escapes content as part of the >>execution of certain methods or calls. > >

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread SGreen
Nathan Gross <[EMAIL PROTECTED]> wrote on 12/21/2005 11:49:10 AM: > On 12/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > Nathan Gross <[EMAIL PROTECTED]> wrote on 12/21/2005 11:20:50 AM: > > > > > > > On 12/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Nathan Gross

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Nathan Gross
On 12/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Nathan Gross <[EMAIL PROTECTED]> wrote on 12/21/2005 11:20:50 AM: > > > > On 12/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Nathan Gross <[EMAIL PROTECTED]> wrote on 12/20/2005 05:34:58 PM: > > > > > > > Hi; > > >

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread JamesDR
Nathan Gross wrote: I get two lists from different sources which I merge into the database via a Java program. Since these two lists themselves sometimes get their data from the same source, my program first does a SELECT on the varchar field (unique index) [to ensure that this data is not ye

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread SGreen
Nathan Gross <[EMAIL PROTECTED]> wrote on 12/21/2005 11:20:50 AM: > On 12/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Nathan Gross <[EMAIL PROTECTED]> wrote on 12/20/2005 05:34:58 PM: > > > > > Hi; > > > [Mysql 4x] In a table where I get data from another program, I have > > > many

Re: Cleaning illegal characters from varchar field

2005-12-21 Thread Nathan Gross
On 12/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Nathan Gross <[EMAIL PROTECTED]> wrote on 12/20/2005 05:34:58 PM: > > > Hi; > > [Mysql 4x] In a table where I get data from another program, I have > > many records (about 1000) that have illegal chars in a [unique] > > indexed varchar

Re: Cleaning illegal characters from varchar field

2005-12-20 Thread SGreen
Nathan Gross <[EMAIL PROTECTED]> wrote on 12/20/2005 05:34:58 PM: > Hi; > [Mysql 4x] In a table where I get data from another program, I have > many records (about 1000) that have illegal chars in a [unique] > indexed varchar field. I would like to clean the illegal characters > out and leave the

Cleaning illegal characters from varchar field

2005-12-20 Thread Nathan Gross
Hi; [Mysql 4x] In a table where I get data from another program, I have many records (about 1000) that have illegal chars in a [unique] indexed varchar field. I would like to clean the illegal characters out and leave the rest of the data intact. 1. Is there a utility to do this? 1b) Or an UPDATE c