Re: NEED URGENT HELP....

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Re: NEED URGENT HELP....
Дата
Msg-id 4590629B.9070808@burntmail.com
обсуждение исходный текст
Ответ на NEED URGENT HELP....  ("Sandip G" <sandip@singapore.com>)
Ответы Re: NEED URGENT HELP....  ("Henrique P Machado" <zehrique@gmail.com>)
Список pgsql-general
Sandip G wrote:
>     WHERE           (USER_ID = $1) AND (COMPANY_ID = $2) AND BOOK_NO IN ($3)

>     select * from sp_get_phase ('sandip', 'oms', '1,4') this return a
>     Blank record.

$3 is a parameter marker for a single value.  You cannot supply a
comma-separated list of values and expect it to operate on them.  As
Harpreet points out, it is interpreting your comma-separated list as a
single value.  If you know you will always have (e.g.) two values you
want to pass, you could code your function with "in ($3, $4)", but if
you want a generalized, variable-length list of values in your IN
clause, you'd need to use dynamic SQL.

--
Guy Rouillier

В списке pgsql-general по дате отправления:

Предыдущее
От: "Harpreet Dhaliwal"
Дата:
Сообщение: Re: NEED URGENT HELP....
Следующее
От: Guy Rouillier
Дата:
Сообщение: Re: Need some Technical support !!!