Trouble With Strings

Started by Colin Taylorover 25 years ago2 messagesgeneral
Jump to latest
#1Colin Taylor
Colin_Taylor@PortaSystemsDev.com

Hi,
I have been having a few problems with strings (varchar)s.
How can I insert a quote ' character in a string?
The following, needless to say does not work:

INSERT INTO table (string) VALUES ('colin's');

Also, are there any other characters that need special attention in order to
put them into the table?
And how can I handle them?
Thanks,
Colin

#2Richard Huxton
dev@archonet.com
In reply to: Colin Taylor (#1)
Re: Trouble With Strings

----- Original Message -----
From: "Colin Taylor" <Colin_Taylor@PortaSystemsDev.com>

Hi,
I have been having a few problems with strings (varchar)s.
How can I insert a quote ' character in a string?
The following, needless to say does not work:

INSERT INTO table (string) VALUES ('colin's');

INSERT INTO table VALUES ('colin\'s back\\slash');

The doubled-backslash is used to put a backslash in. Perl, PHP and the like
provide help with this sort of thing.

- Richard