[SQL] Escape sequence for UTF-8 Character Literals?

2008-01-10 Thread James Cloos
I’ve a data set in a text file which uses the U+ syntax for UCS characters which I want to enter into a (utf8) db, using the actual characters rather than the codepoint names. The docs give the impression that eg E'\x91D1' ought to be the same as '金', but my tests show that \x only accepts 2 h

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread Thomas Good
On Wed, 27 Nov 2002 [EMAIL PROTECTED] wrote: > Why dont' you use prepare and execute in case you are using DBI > same program is like this. > > $dbh = DBI -> connect ( ".."); > $sth = $dbh -> prepare("insert into tab (a,b) values (?,?)"); > $sth -> execute($a , $b ); > $sth -> finish(); > $db

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread Thomas Good
On Wed, 27 Nov 2002 [EMAIL PROTECTED] wrote: > Why dont' you use prepare and execute in case you are using DBI > same program is like this. > > $dbh = DBI -> connect ( ".."); > $sth = $dbh -> prepare("insert into tab (a,b) values (?,?)"); > $sth -> execute($a , $b ); > $sth -> finish(); > $db

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread Dan Langille
On 27 Nov 2002 at 0:01, [EMAIL PROTECTED] wrote: > > Hi Group - > > > > I have a perl application for a registration form. > > Same Here, > > Why dont' you use prepare and execute in case you are using DBI > same program is like this. > > $dbh = DBI -> connect ( ".."); > $sth = $dbh -> pre

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread mallah
> Hi Group - > > I have a perl application for a registration form. Same Here, Why dont' you use prepare and execute in case you are using DBI same program is like this. $dbh = DBI -> connect ( ".."); $sth = $dbh -> prepare("insert into tab (a,b) values (?,?)"); $sth -> execute($a , $b ); $

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread mark carew
Woops should have been masquerading ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[SQL] escape single quote in INSERT command

2002-11-26 Thread Hunter
Hi Group - I have a perl application for a registration form. I'd like to put escape characters in my insert command to accommodate for ' (i.e. O'Brien, O'Malley, etc). I've tired double quotes, single quotes, back tick, forward ticks, curly bracket, round brackets - no success. Thanks, dave -

Re: [SQL] escape single quote in INSERT command

2002-11-26 Thread mark carew
Hi Hunter, From my xbase++ program suite, sqlcontext class. * cValue := strtran(cValue,['],[\']) * Its called masquarading, simply replace the single quote with back_slash + single quote. Regards Mark Carew Brisbane Australia

Re: [SQL] escape single quote in INSERT command

2002-11-22 Thread Jeff Boes
On Fri, 22 Nov 2002 08:00:01 -0500, Hunter wrote: > I have a perl application for a registration form. I'd like to put > escape characters in my insert command to accommodate for ' (i.e. > O'Brien, O'Malley, etc). I've tired double quotes, single quotes, back > tick, forward ticks, curly bracket,

Re: [SQL] Escape Quotes

2001-05-10 Thread Keith Gray
Tom Lane wrote: > > Keith Gray <[EMAIL PROTECTED]> writes: > > Is it possible to get/configure PostgreSQL to handle > > as within a dleimited string? > > We already do. > > regression=# select 'O''SHEA'; > ?column? > -- > O'SHEA > (1 row) > > regards, tom la

Re: [SQL] Escape Quotes

2001-05-10 Thread Tom Lane
Keith Gray <[EMAIL PROTECTED]> writes: > This may be a problem in "ipgsql" then?? I guess. What is that, anyway? > ...or is it different in update from select? Nope, a literal is a literal. regards, tom lane ---(end of broadcast)---

Re: [SQL] Escape Quotes

2001-05-10 Thread Tom Lane
Keith Gray <[EMAIL PROTECTED]> writes: > Is it possible to get/configure PostgreSQL to handle > as within a dleimited string? We already do. regression=# select 'O''SHEA'; ?column? -- O'SHEA (1 row) regards, tom lane ---(end of broad

[SQL] Escape Quotes

2001-05-10 Thread Keith Gray
When using apostrophies the PostgreSQL string seems to like an escape character as follows: update client set code = 'O\'SHEA' where clientid = 2; The ANSI-92 standard seems to suggest that this could/should be handled by ::= ' ::= update client set code = 'O''SHEA' whe

Re: [SQL] % escape

2000-08-15 Thread Jesus Aneiros
To escape % use \\% as in '50\\%', to escape ' use '' as in 'o''conell', retrieves o'conell Regards. -- Jesus Aneiros Sosa mailto:[EMAIL PROTECTED] http://jagua.cfg.sld.cu/~aneiros On Tue, 15 Aug 2000, Jie Liang wrote: > Hi,there, > > Is anybody know how I can escape % or ' (my column contai

[SQL] % escape

2000-08-15 Thread Jie Liang
Hi,there, Is anybody know how I can escape % or ' (my column contains % or ' ) in my text field. select mystring from textbook where mystring like . -- Jie LIANG Internet Products Inc. 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 [EMAIL PROTECTED] www.