dbTalk Databases Forums  

How to put Single Quote and Double Quote in one SQL Statement at theSame time

comp.databases.paradox comp.databases.paradox


Discuss How to put Single Quote and Double Quote in one SQL Statement at theSame time in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
a13965@gmail.com
 
Posts: n/a

Default How to put Single Quote and Double Quote in one SQL Statement at theSame time - 01-29-2009 , 10:46 AM






Hi, I have a table t, which has only one alphabat field, then I want
to add this record: A'B"

But how can I do this in a dynamic SQL? I tried:
INSERT INTO t VALUES('A'B"')
failed
INSERT INTO t VALUES("A'B"")
failed

Your help is appriciated!

Reply With Quote
  #2  
Old   
Larry DiGiovanni
 
Posts: n/a

Default Re: How to put Single Quote and Double Quote in one SQL Statement at the Same time - 01-29-2009 , 05:37 PM







<a13965 (AT) gmail (DOT) com> wrote:

Quote:
But how can I do this in a dynamic SQL? I tried:
INSERT INTO t VALUES('A'B"')
failed
INSERT INTO t VALUES("A'B"")
failed

Your help is appriciated!
I believe you must escape the " with a backslash (\) and double up on the ',
as in:

INSERT INTO t VALUES('A''B\"')

--
Larry DiGiovanni




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.