Skip site navigation (1) Skip section navigation (2)

Quote Question

From: Greg Lindstrom <greg(dot)lindstrom(at)novasyshealth(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Quote Question
Date: 2005-03-30 15:31:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I had a query to insert values into a table where some of the entries 
were empty:

     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:

     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 Lindstrom               501 975.4859 (office)
Senior Programmer            501 219-4455 (fax)
NovaSys Health               greg(dot)lindstrom(at)novasyshealth(dot)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 or entity 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 strictly prohibited. If you have received this communication in error, please notify the sender by replying to this message and destroy this message and delete any copies held in your electronic files. Thank you.


pgsql-novice by date

Next:From: John DeSoiDate: 2005-03-30 16:22:20
Subject: Re: Quote Question
Previous:From: John DeSoiDate: 2005-03-30 05:36:50
Subject: Re: Connecting to database using pg_connect

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group