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 E80F152AF8 for ; Wed, 10 Aug 2005 11:30:30 -0300 (ADT) 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 60423-02 for ; Wed, 10 Aug 2005 14:30:20 +0000 (GMT) Received: from mailserv.pune.wibhu.com (unknown [210.212.168.94]) by svr1.postgresql.org (Postfix) with ESMTP id DEBBE52A04 for ; Wed, 10 Aug 2005 11:30:11 -0300 (ADT) Received: from Akshay ([192.168.1.110]) by mailserv.pune.wibhu.com (8.12.8/8.12.5) with ESMTP id j7AERirw021029 for ; Wed, 10 Aug 2005 19:57:50 +0530 From: "Akshay Mathur" To: Subject: sql function: using set as argument Date: Wed, 10 Aug 2005 20:00:24 +0530 Message-ID: <001a01c59db8$0fdef360$6e01a8c0@pune.wibhu.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001B_01C59DE6.29972F60" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.19 tagged_above=0 required=5 tests=HTML_90_100, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200508/82 X-Sequence-Number: 22310 This is a multi-part message in MIME format. ------=_NextPart_000_001B_01C59DE6.29972F60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I have a function that returns a set. Looks like: Select a_column from a_table where some_condition; I want to use output of this function as an argument of another function Second looks like: Get_count(result_set_of_function_1, int) Select count(b_column) from some_table where some_field_1 in ($1) and some_field_2 = $2; Please suggest how can I do that? Regards, akshay --------------------------------------- Akshay Mathur SMTS, Product Verification AirTight Networks, Inc. ( www.airtightnetworks.net) O: +91 20 2588 1555 ext 205 F: +91 20 2588 1445 ------=_NextPart_000_001B_01C59DE6.29972F60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I have a function that returns a set. =

Looks = like:

        = ;    Select a_column from a_table where some_condition;

 

I want to use output of this function as an argument = of another function

        = ;    Second looks like:

        = ;            =     Get_count(result_set_of_function_1, = int)

        = ;            =             = ;    Select count(b_column) from some_table where = some_field_1 in ($1) and some_field_2 =3D $2;

 

Please suggest how can I do = that?

 

Regards,

 

akshay<= font size=3D2 face=3DArial>

 

 

-----------------------------------= ----

Akshay Mathur

SMTS, Product = Verification

AirTight = Networks, Inc. (= www.airtightnetworks.net)

O: +91 20 2588 1555 ext = 205

F: +91 20 2588 1445

 

------=_NextPart_000_001B_01C59DE6.29972F60--