Re: plpgsql: Bush becomes a null, can not execute null query
В списке pgsql-admin по дате отправления:
| От | Josh Goldberg |
|---|---|
| Тема | Re: plpgsql: Bush becomes a null, can not execute null query |
| Дата | |
| Msg-id | 3F4E422E.7050709@4dmatrix.com обсуждение исходный текст |
| Ответ на | plpgsql: Bush becomes a null, can not execute null query (Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>) |
| Ответы |
Re: plpgsql: Bush becomes a null, can not execute null query
|
| Список | pgsql-admin |
Concatenating a null value makes the string null. try:
SELECT 'foo'||NULL||'bar';
Just add a condition to check rivi.suoritus for null before making an
assignment.
Mauri Sahlberg wrote:
>returns nothing - bush becomes null and everything fails. I do not
>undestand why bush becomes null when the query returns nothing.
>
>
> bush:=''select * from PaivanLeimat('' ||
> quote_literal(aYritys) ||
> ''::varchar,'' ||
> quote_literal(nyt) ||
> ''::date,''||
> quote_literal(aKtunnus) ||
> ''::varchar,'' ||
> latest
> ||'')'';
>
>
<snip>
> latest:=rivi.suoritus;
>
>
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера