Re: impossible to update rows specifying columns with NULL

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: impossible to update rows specifying columns with NULL
Дата
Msg-id 422C525F.2020908@logix-tt.com
обсуждение исходный текст
Ответ на Re: impossible to update rows specifying columns with NULL  (Andreas Ulbrich <ulbrich@osp-dd.de>)
Список pgsql-jdbc
Hi, Andreas,

Andreas Ulbrich schrieb:
> I found in our project the following construct to handle this situation:
>
> UPDATE tab SET colx = ... WHERE ... coly IS NULL AND ? IS NULL OR coly = ? ...
>
> - You must bind the value twice.
> - We are using ORACLE, but it seems to bo standard like

Maybe you can encapsulate this in a plpgsql function, so you need to
bind the value only once.

Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

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

Предыдущее
От: Andreas Ulbrich
Дата:
Сообщение: Re: impossible to update rows specifying columns with NULL
Следующее
От: Ian Pilcher
Дата:
Сообщение: Re: ident auth postgres 7.4 fedora core 3