From: | Heath Tanner <heath(at)inligo(dot)com> |
---|---|
To: | Juan Francisco Diaz <j-diaz(at)publicar(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Concatenating |
Date: | 2003-09-24 02:03:23 |
Message-ID: | 4724C8A3-EE33-11D7-99A5-0003930C11A0@inligo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Tuesday, September 23, 2003, at 06:08 PM, Juan Francisco Diaz wrote:
> cadena := 'select * from orden where idlibro = ';
> cadena := cadena || Libro;
> cadena := cadena || ' order by idorden limit ';
> cadena := cadena || ''numFin'';
> cadena := cadena || ';';
>
> And I cant get it to wrok. Libro and numFin are variables that are
> received
> in a pgsql function. Libro is char(6) and numFin is numeric.
> I tried this and also doing everything in the same line... With no good
> results... Iam now very confused with this!!!! AHAHHAHAh
Looks like you need to double your quotes, e.g. ''select * from orden
where idlibro = ''.
See "19.11.1.1. Quote Me on That: Escaping Single Quotes":
http://www.postgresql.org/docs/7.3/interactive/plpgsql-porting.html.
-heath
From | Date | Subject | |
---|---|---|---|
Next Message | Juan Francisco Diaz | 2003-09-24 12:52:19 | Badly placed ()'s |
Previous Message | Juan Francisco Diaz | 2003-09-23 22:08:38 | Concatenating |