X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 91A37475B47 for ; Mon, 28 Apr 2003 05:45:53 -0400 (EDT) Received: from nova.office.sageway.com.sg (adsl-210-193-27-71.qala.com.sg [210.193.27.71]) by postgresql.org (Postfix) with ESMTP id 1D18F4758C9 for ; Mon, 28 Apr 2003 05:45:51 -0400 (EDT) Received: from pc66 ([192.168.1.243]) by nova.office.sageway.com.sg (8.11.6/8.11.6) with ESMTP id h3S9q8E24171; Mon, 28 Apr 2003 17:52:08 +0800 From: "lihao" To: "'Tomasz Myrta'" Cc: Subject: Re: Pl Pgsql problem Date: Mon, 28 Apr 2003 18:14:29 +0800 Message-ID: <001901c30d6e$f4849880$f301a8c0@pc66> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <3EACF24B.5050502@klaster.net> X-Spam-Status: No, hits=-15.8 required=5.0 tests=BAYES_20,IN_REP_TO,ORIGINAL_MESSAGE,QUOTED_EMAIL_TEXT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/410 X-Sequence-Number: 13111 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