From dja.mnurdin@cma-cgm.com Tue Nov 30 02:56:07 2004 X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9EB663A52F3; Tue, 30 Nov 2004 02:56:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01597-04; Tue, 30 Nov 2004 02:55:59 +0000 (GMT) Received: from mms24bas.mms.us.syntegra.com (ip192-12-251-70.block6.us.syntegra.com [192.12.251.70]) by svr1.postgresql.org (Postfix) with ESMTP id 989BB3A52F1; Tue, 30 Nov 2004 02:56:00 +0000 (GMT) Received: from mms21es.mms.us.syntegra.com (mms21es.mms.us.syntegra.com [150.143.232.10]) by mms24bas.mms.us.syntegra.com with ESMTP; Tue, 30 Nov 2004 02:56:00 Z Received: from mms22bas.mms.us.syntegra.com (mms22bas.mms.us.syntegra.com [192.12.251.30]) by mms21es.mms.us.syntegra.com with ESMTP; Tue, 30 Nov 2004 02:55:59 Z Received: from cmamail.cma-cgm.com (cmamail.cma-cgm.com [193.109.119.1]) by relay22.ob.gen.mms.us.syntegra.com with ESMTP; Tue, 30 Nov 2004 02:55:59 Z Received: from CMAP4110 ([10.11.3.138] [10.11.3.138]) by cmamail.cma-cgm.com; Tue, 30 Nov 2004 03:54:38 +0100 Message-Id: <00de01c4d688$4bc0cf40$8a030b0a@JACARTA.CMACGM.COM> Reply-To: "Nurdin" From: "Nurdin" To: "pgsql-sql" , "pgsql-general" Subject: create stored procedure from temporary table Date: Tue, 30 Nov 2004 09:57:12 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00DB_01C4D6C2.F69D7410" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200411/1466 X-Sequence-Number: 69546 This is a multi-part message in MIME format. ------=_NextPart_000_00DB_01C4D6C2.F69D7410 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable i was wondering, how to create dynamic table like temporary table but = create from function and the result from function too....cos i want = count same calculation from other table migh be a multiple table so i = need looping and join table... thnax=20 nurdin ------=_NextPart_000_00DB_01C4D6C2.F69D7410 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
i was wondering, how to create dynamic = table like=20 temporary table but create from function and the result from function = too....cos=20 i want count same calculation from other table migh be a multiple table = so i=20 need looping and join table...
 
thnax
 
nurdin
------=_NextPart_000_00DB_01C4D6C2.F69D7410-- From cbbrowne@acm.org Tue Nov 30 04:22:42 2004 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7F0A93A52EA for ; Tue, 30 Nov 2004 04:22:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28018-07 for ; Tue, 30 Nov 2004 04:22:39 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.250.190.2]) by svr1.postgresql.org (Postfix) with ESMTP id 852D43A442D for ; Tue, 30 Nov 2004 04:22:38 +0000 (GMT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id AE38F31923; Tue, 30 Nov 2004 05:22:37 +0100 (MET) From: Christopher Browne X-Newsgroups: pgsql.sql Subject: Re: create stored procedure from temporary table Date: Mon, 29 Nov 2004 23:09:14 -0500 Organization: cbbrowne Computing Inc Lines: 14 Message-ID: References: <00de01c4d688$4bc0cf40$8a030b0a@JACARTA.CMACGM.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:DH45OqItKpeZEolFuHp4CKcju/U= To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/293 X-Sequence-Number: 19611 Oops! dja.mnurdin@cma-cgm.com ("Nurdin") was seen spray-painting on a wall: > i was wondering, how to create dynamic table like temporary table > but create from function and the result from function too....cos i > want count same calculation from other table migh be a multiple > table so i need looping and join table... Well, you can define a temporary table inside a stored procedure using EXECUTE, as long as all of the operations that touch that table are kept inside dynamic SQL invoked using EXECUTE... -- output = reverse("moc.liamg" "@" "enworbbc") http://www.ntlug.org/~cbbrowne/oses.html "Bonus! The lack of multitasking is one of the most important reasons why DOS destroyed Unix in the marketplace." -- Scott Nudds