Messages per Month
13 messages in com.mysql.lists.mysqlchar() function| From | Sent On | Attachments |
|---|---|---|
| Don Vu | 08 Apr 2002 08:07 | |
| Don Vu | 08 Apr 2002 08:24 | |
| Benjamin Pflugmann | 08 Apr 2002 08:40 | |
| Chuck "PUP" Payne | 08 Apr 2002 08:48 | |
| Peter Romianowski | 08 Apr 2002 08:57 | |
| Christopher Thompson | 08 Apr 2002 09:01 | |
| Rick Emery | 08 Apr 2002 09:03 | |
| Egor Egorov | 08 Apr 2002 09:07 | |
| mike | 08 Apr 2002 09:14 | |
| Neil Freeman | 08 Apr 2002 09:25 | |
| Chuck "PUP" Payne | 08 Apr 2002 09:34 | |
| Roger Baklund | 08 Apr 2002 10:52 | |
| Benjamin Pflugmann | 08 Apr 2002 12:08 |
| Subject: | char() function![]() |
|---|---|
| From: | Don Vu (dv...@Madstonefilms.com) |
| Date: | 04/08/2002 08:07:53 AM |
| List: | com.mysql.lists.mysql |
Hi guys,
Our java code blows up when we try to insert a string with a ';' inside of it.
So we tried to do a work-around by replacing ';' with '||CHAR(59)||' to insert
it, using the char function and the character's respecitve ascii value. So
instead of:
insert into table (key, field) values (1, 'test;string');
we had:
insert into table (key, field) values (1, 'test'||CHAR(59)||' string');
it seems to work initially...(Query OK, 1 row affected (0.00 sec)) but when I
try to select the value of the field I get just the value '0' (string of zero).
Anyone know what gives? If not, any ideas on another way to handle the problem?
It seemed like the CHAR() function was made for situations like this....
thanks, Don




