ifnull

Поиск
Список
Период
Сортировка
От Joseph Shraibman
Тема ifnull
Дата
Msg-id 38C73BDF.B4C83976@selectacast.net
обсуждение исходный текст
Список pgsql-interfaces
Could someone tell me how to use ifnull?  Whenever I try it postgres
tells me:

playpen=> insert into tabled (userkey, value) values (2, ifnull(null,
'c'));
ERROR:  No such function 'ifnull' with the specified attributes

What I need it for is when I do an insert into my table like this:
playpen=> insert into tabled select max(userkey) + 1, 'texthere';
ERROR:  ExecAppend: Fail to add null value in not null attribute userkey

... I get a problem when I'm inserting the first data into the table
because max returns null.



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

Предыдущее
От: youxiangmail
Дата:
Сообщение: A problem about psqlodbc.
Следующее
От: Peter Mount
Дата:
Сообщение: RE: [INTERFACES] Type mappings