| От | Richard Huxton |
|---|---|
| Тема | Re: Column does not exist when trying to insert data. |
| Дата | |
| Msg-id | 45FA4FBA.4040200@archonet.com обсуждение исходный текст |
| Ответ на | Column does not exist when trying to insert data. ("Parthan SR" <python.technofreak@gmail.com>) |
| Список | pgsql-general |
Parthan SR wrote:
> I get the following error in the browser, whent he fields for unit and
> returnedas are left blank and hence becomes None.
> I also tried to have some string value such as 'nos' and 'not reqd' for
> 'unit' and 'requiredas' but still it get a similar error
> saying column 'nos' does not exist.
>
> *ProgrammingError*: ERROR: column "none" does not exist INSERT INTO
> orderitem
> (item,quantity,unit,conference,seller,incharge,orderdate,duedate,returnedas)
>
> VALUES (6,10.000000,None,39,1,1,2007-3-16,20-03-2007,None)
> args = ('ERROR: column "none" does not exist\n\nINSERT INT...,
> 10.000000,None,39,1,1,2007-3-16,20-03-2007,None)',)
You're looking for "Null" rather than "None".
Oh, and your dates need to be quoted too.
--
Richard Huxton
Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера