Re: invalid input syntax for integer: "NULL"

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: invalid input syntax for integer: "NULL"
Дата
Msg-id 20041015145918.B90697@megazone.bigpanda.com
обсуждение исходный текст
Ответ на invalid input syntax for integer: "NULL"  (Kumar S <ps_postgres@yahoo.com>)
Список pgsql-novice
On Fri, 15 Oct 2004, Kumar S wrote:

> In my table definition I defined INTEGER. When I
> uploaded my data it did not take empty SPACE as
> character type. Following a friends suggestion
> (experienced in ORACLE) I made those empty spaces as
> NULL and then I tried to input my insert statement.
>
> I get ERROR:
> ERROR:  invalid input syntax for integer: "NULL"
>
> I might want to perform calculations on this column
> and if null is not accepted for INTEGER data type,
> then the only way for me is to make it varchar. BUT I
> CANNOT perform caclulations on this column. It is sad.
>
>
> Is there a way to get going.  Please help me.
>
> Below is my table definition and INSERT STATEMENT.
> Many columns has empty spaces. I cannot put Zero's or
> any other negative values because these are
> statistical data columns and zero and any other number
> mean something and might lead to erratic conclusions.
> SORRY these sql statements and table definitions are
> big.

...
> VALUES ( '9215','18491','IMAGE:267638','FLJ22004','hypothetical protein
> FLJ22004','Hs.108812','N25427','NULL','115416','224','NULL','NULL',
...

You probably want NULL rather than 'NULL'.  The former means a null value,
the latter means the word NULL.

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

Предыдущее
От: Kumar S
Дата:
Сообщение: invalid input syntax for integer: "NULL"
Следующее
От: Mitch Pirtle
Дата:
Сообщение: Re: possible to access a Linux box db from a Windows box via a GUI?