Skip site navigation (1) Skip section navigation (2)

NEED URGENT HELP....

From: "Sandip G" <sandip(at)singapore(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: NEED URGENT HELP....
Date: 2006-12-21 07:41:33
Message-ID: 20061221074133.5B05A872DC@cal1-1.us4.outblaze.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-generalpgsql-sql
  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 = $1) AND (COMPANY_ID = $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 = 'testUser') AND (COMPANY_ID = 'testCompany') AND
  BOOK_NO IN (1,4)

  ----- This Works fine... returns 2 records. What may be the problem?

  Thanks in advance.
  Regards,
  Sandip.

-- 
___________________________________________________
Search for products and services at:
http://search.mail.com

Responses

pgsql-sql by date

Next:From: Gary StainburnDate: 2006-12-21 09:46:56
Subject: Re: join/group/count query.
Previous:From: Hector VillarrealDate: 2006-12-20 18:06:29
Subject: Re: join/group/count query.

pgsql-bugs by date

Next:From: Tony MarstonDate: 2006-12-21 11:28:40
Subject: BUG #2848: information_schema.key_column_usage does not work
Previous:From: SandipDate: 2006-12-21 07:38:52
Subject: BUG #2847: Bug with IN statement

pgsql-general by date

Next:From: Richard HuxtonDate: 2006-12-21 08:05:29
Subject: Re: Need help on "org.postgresql.util.PSQLException: FATAL:
Previous:From: Wong JowoDate: 2006-12-21 05:09:58
Subject: Need help on "org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group