Problem with apostrophe
Is there any way of having an apostrophe in a data field?
It is a problem because the apostrophe is the same character as the single
quote, so the database gets a parser error when a name such as "O'Brian"
is entered.
There must be a work-around, but I can not find any solution.
thank you for your help
On Wed, 17 Jun 1998 eric@gateway.ctlno.com wrote:
Is there any way of having an apostrophe in a data field?
It is a problem because the apostrophe is the same character as the single
quote, so the database gets a parser error when a name such as "O'Brian"
is entered.
Have you tried doubling up? 'O''Brian'
That is what I have to do in Oracle anyway.
--
Amos Hayes Systems Architect
ahayes@ingenia.com Ingenia Group - Software Kinetics Ltd.
http://smurf.ingenia.com/~ahayes http://www.ingenia.com
"Remember: No one can make you feel inferior without your consent."
- ELEANOR ROOSEVELT
the escape character brings up the help menu, thinking that \' is not a
valid option.
On Wed, 17 Jun 1998, Brett W. McCoy wrote:
Show quoted text
On Wed, 17 Jun 1998, Amos Hayes wrote:
Is there any way of having an apostrophe in a data field?
It is a problem because the apostrophe is the same character as the single
quote, so the database gets a parser error when a name such as "O'Brian"
is entered.Have you tried doubling up? 'O''Brian'
That is what I have to do in Oracle anyway.
Isn't there an escape character, like the slash?
Brett W. McCoy
http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
"The Number of UNIX installations has grown to 10, with more expected."
-- The UNIX Programmer's Manual, 2nd Edition, June, 1972
Import Notes
Reply to msg id not found: Pine.BSI.3.91.980617155655.29739E-100000@access1.lan2wan.com | Resolved by subject fallback
Just escape the apostrophe with a backslash.
Byron
eric@gateway.ctlno.com wrote:
Show quoted text
Is there any way of having an apostrophe in a data field?
It is a problem because the apostrophe is the same character as the single
quote, so the database gets a parser error when a name such as "O'Brian"
is entered.There must be a work-around, but I can not find any solution.
thank you for your help
On Wed, 17 Jun 1998, Amos Hayes wrote:
Is there any way of having an apostrophe in a data field?
It is a problem because the apostrophe is the same character as the single
quote, so the database gets a parser error when a name such as "O'Brian"
is entered.Have you tried doubling up? 'O''Brian'
That is what I have to do in Oracle anyway.
Isn't there an escape character, like the slash?
Brett W. McCoy
http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
"The Number of UNIX installations has grown to 10, with more expected."
-- The UNIX Programmer's Manual, 2nd Edition, June, 1972
eric@gateway.ctlno.com writes:
the escape character brings up the help menu, thinking that \' is not a
valid option.
No.
Entering something like
SELECT * FROM foo WHERE name=�O\�Brian�;
definitely works.
Ciao
Christoph
--
** http://ourworld.compuserve.com/homepages/ChLorenz/ ** ChLorenz@csi.com **
** No Spam ! ** No Adverts ! ** No Junk-Mails ! ** No unwanted Mails ! **
Import Notes
Reply to msg id not found: eric@gateway.ctlno.com'smessageofWed17Jun1998144438-0500CDT
On Wed, 17 Jun 1998 eric@gateway.ctlno.com wrote:
Is there any way of having an apostrophe in a data field?
It is a problem because the apostrophe is the same character as the single
quote, so the database gets a parser error when a name such as "O'Brian"
is entered.There must be a work-around, but I can not find any solution.
thank you for your help
You may use doubble apostrophe as in O''Brian to match O'Brian this is
SQL92.
Jose'
| |
~~~~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~~~~~~~~~~
Progetto HYGEA ---- ---- www.sferacarta.com
Sfera Carta Software ---- ---- sferac@bo.nettuno.it
Via Bazzanese, 69 | | Fax. ++39 51 6131537
Casalecchio R.(BO) Italy | | Tel. ++39 51 591054
-----------------------------------------------------------------------------