Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id CA6D89FA43C for ; Thu, 21 Dec 2006 04:09:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 48630-05 for ; Thu, 21 Dec 2006 04:08:47 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 54CE39FA49E for ; Thu, 21 Dec 2006 04:08:49 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from webmail-outgoing.us4.outblaze.com (webmail-outgoing.us4.outblaze.com [205.158.62.67]) by svr4.postgresql.org (Postfix) with ESMTP id 2502F5AF034 for ; Thu, 21 Dec 2006 07:41:36 +0000 (GMT) Received: from unknown (unknown [192.168.9.180]) by webmail-outgoing.us4.outblaze.com (Postfix) with QMQP id 694181800129 for ; Thu, 21 Dec 2006 07:41:34 +0000 (GMT) X-OB-Received: from unknown (205.158.62.188) by wfilter.us4.outblaze.com; 21 Dec 2006 07:41:34 -0000 Received: by cal1-1.us4.outblaze.com (Postfix, from userid 1001) id 5B05A872DC; Thu, 21 Dec 2006 07:41:33 +0000 (GMT) Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary="_----------=_1166686893174611" MIME-Version: 1.0 From: "Sandip G" To: pgsql-bugs@postgresql.org Cc: pgsql-sql@postgresql.org, pgsql-general@postgresql.org Date: Thu, 21 Dec 2006 02:41:33 -0500 Subject: NEED URGENT HELP.... Importance: high Received: from [127.0.0.1] by cal1-1.us4.outblaze.com with http for sandip@singapore.com; Thu, 21 Dec 2006 02:41:33 -0500 X-Originating-Ip: 127.0.0.1 X-Originating-Server: cal1-1.us4.outblaze.com Message-Id: <20061221074133.5B05A872DC@cal1-1.us4.outblaze.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.533 tagged_above=0 required=5 tests=BAYES_50, HTML_40_50, HTML_IMAGE_ONLY_20, HTML_MESSAGE, HTML_SHORT_LINK_IMG_3, SUBJ_ALL_CAPS X-Spam-Level: *** X-Archive-Number: 200612/185 X-Sequence-Number: 16573 This is a multi-part message in MIME format. --_----------=_1166686893174611 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-2022-jp" I am using PostgreSql 8.1 with pgAdmin III. OS is XP. this is my function: CREATE OR REPLACE FUNCTION sp_get_phase(character varying, character varying, character varying) RETURNS ret_dv_sp_get_phase AS $BODY$ SELECT BOOK_NO, USER_ID, COMPANY_ID, PHASE, UPDATE_USER_ID, UPDATE_DATE, AddInfo1, AddInfo2 FROM T_PHASE WHERE (USER_ID =3D $1) AND (COMPANY_ID =3D $2) AND BOOK_NO IN ($3) $BODY$ LANGUAGE 'sql' VOLATILE; When I run select * from sp_get_phase ('sandip', 'oms', '4') returns 1 record.....this works fine.... select * from sp_get_phase ('sandip', 'oms', '1') returns 1 record.....this also works fine... BUT select * from sp_get_phase ('sandip', 'oms', '1,4') this return a Blank record. I tried to execute the SQL statement from the function SELECT BOOK_NO, USER_ID, COMPANY_ID, PHASE, UPDATE_USER_ID, UPDATE_DATE, AddInfo1, AddInfo2 FROM T_PHASE WHERE (USER_ID =3D 'testUser') AND (COMPANY_ID =3D 'testCompany') AND BOOK_NO IN (1,4) ----- This Works fine... returns 2 records. What may be the problem? Thanks in advance. Regards, Sandip. --=20 ___________________________________________________ Search for products and services at: http://search.mail.com --_----------=_1166686893174611 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="iso-2022-jp"
I am using PostgreSql 8.1 with pgAdmin III. OS is XP.<= /DIV>
 
this i= s my function:

CREATE OR REPLACE FUNCTION sp_get_phase(character var= ying, character varying, character varying)
  RETURNS ret_dv_sp_get= _phase AS
$BODY$
SELECT          BOOK_NO, US= ER_ID, COMPANY_ID, PHASE, UPDATE_USER_ID, UPDATE_DATE,
    &n= bsp;                 AddInfo1, AddI= nfo2
FROM            T_PHASE
WHERE &nbs= p;         (USER_ID =3D $1) AND (COMPANY_ID =3D $2) AND= BOOK_NO IN ($3)
$BODY$
  LANGUAGE 'sql' VOLATILE;


Wh= en I run
select * from sp_get_phase ('sandip', 'oms', '4')   retur= ns 1 record.....this works fine....

select * from sp_get_phase ('san= dip', 'oms', '1')  returns 1 record.....this also works fine... BUT
select * from sp_get_phase ('sandip', 'oms', '1,4') this return a Bla= nk record.

I tried to execute the SQL statement from the function
SELECT          BOOK_NO, USER_ID, COMPANY_ID= , PHASE, UPDATE_USER_ID, UPDATE_DATE,
         = ;             AddInfo1, AddInfo2
FROM &nbs= p;          T_PHASE
WHERE       =     (USER_ID =3D 'testUser') AND (COMPANY_ID =3D 'testCompany') A= ND BOOK_NO IN (1,4)

----- This Works fine... returns 2 records. &nbs= p; What may be the problem?

Thanks in advance.
Regards,
Sandi= p.

--=20 3D""=20 --_----------=_1166686893174611--