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@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Tomasz Myrta
Sent: Monday, April 28, 2003 5:20 PM
To: lihao
Cc: pgsql-sql@postgresql.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?
http://archives.postgresql.org