From: | "lihao" <lihao(at)sageway(dot)com(dot)sg> |
---|---|
To: | "'Tomasz Myrta'" <jasiek(at)klaster(dot)net> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Pl Pgsql problem |
Date: | 2003-04-28 10:14:29 |
Message-ID: | 001901c30d6e$f4849880$f301a8c0@pc66 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
What I try to get is
venus=# select ('UPD' || int2hex(nextval('updid'), 8)) as v_updid;
v_updid
-------------
UPD0000145C
(1 row)
updid is a sequence. I am try to generate a index with character and
sequence number.
Anyway, I solve it by change the script to :
select (''UPD'' || int2hex(nextval(''updid''), 8)) into v_updid;
Thank you.
Li Hao
-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org
[mailto:pgsql-sql-owner(at)postgresql(dot)org] On Behalf Of Tomasz Myrta
Sent: Monday, April 28, 2003 5:20 PM
To: lihao
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Pl Pgsql problem
Dnia 2003-04-28 11:29, Uz.ytkownik lihao napisa?:
> So the Line 9 is this line:
> select (''UPD'' || int2hex(nextval(''updid''), 8)) as
> v_updid;
Did you mean:
select into v_updid ''UPD'' || int2hex(nextval(''updid''), 8);
?
Tomasz
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar Mallah | 2003-04-28 12:12:24 | plpgsql Question.. |
Previous Message | Christoph Haller | 2003-04-28 09:29:41 | Re: Rule definition problem |