Re: doesn't recognize "!=-" (not equal to a negative value)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: doesn't recognize "!=-" (not equal to a negative value)
Дата
Msg-id 5758.1152650047@sss.pgh.pa.us
обсуждение исходный текст
Ответ на doesn't recognize "!=-" (not equal to a negative value)  (Paul Tilles <Paul.Tilles@noaa.gov>)
Список pgsql-general
Paul Tilles <Paul.Tilles@noaa.gov> writes:
> UPDATE tablename SET value = 0.0 where value!=-9.4;
> ERROR:  operator does not exist: smallint !=- integer
> HINT:  No operator matches the given name and argument type(s). You may
> need to add explicit type casts.

This is not a bug, this is a feature.

Put a space between, or else use the SQL-standard spelling of not-equals,
ie <>

    UPDATE tablename SET value = 0.0 where value!= -9.4;
    UPDATE tablename SET value = 0.0 where value<>-9.4;

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgsql vs mysql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql vs mysql