Quote Question - Mailing list pgsql-novice

From Greg Lindstrom
Subject Quote Question
Date
Msg-id 424AC659.1020402@novasyshealth.com
Whole thread Raw
Responses Re: Quote Question
List pgsql-novice
Hello-
I had a query to insert values into a table where some of the entries
were empty:

INSERT INTO MYTABLE (VALUE_1, VALUE_2)
     VALUES ('Hello', '')

which worked like a champ.  I discovered some single ticks in the data I
wanted to place in the VALUE_2 field (the data is "Woman's Health") so,
since I'm using Python to drive this, I thought I could change the
single ticks in the above query to double ticks:

INSERT INTO MYTABLE (VALUE_1, VALUE_2)
     VALUES ("Hello", "")

but I now get an error complaining about a "zero length delimited
identifier".  Rats. So:

1.  What's going on above with single and double quotes?

2.  How can I insert single (and double) ticks into my data fields?

Thanks for you help,
--greg

--
Greg Lindstrom               501 975.4859 (office)
Senior Programmer            501 219-4455 (fax)
NovaSys Health               greg.lindstrom@novasyshealth.com
Little Rock, Arkansas

"We are the music makers, and we are the dreamers of dreams."  W.W.

Confidentiality Notice
----------------------
This email and any attachments to it are privileged and confidential and are intended solely for use of the individual
orentity to which they are addressed. If the reader of this message is not the intended recipient, any use,
distribution,or copying of this communication, or disclosure of all or any part of its content to any other person, is
strictlyprohibited. If you have received this communication in error, please notify the sender by replying to this
messageand destroy this message and delete any copies held in your electronic files. Thank you. 


pgsql-novice by date:

Previous
From: John DeSoi
Date:
Subject: Re: Connecting to database using pg_connect
Next
From: John DeSoi
Date:
Subject: Re: Quote Question