Re: Strange Insert Problem

Поиск
Список
Период
Сортировка
Искать
От
Bruno LEVEQUE
Тема
Re: Strange Insert Problem
Дата
Msg-id
3FFE8498.7020900@net6d.com
Ответ на
Список
Дерево обсуждения
Strange Insert Problem Lola Lee <lola@his.com>
Re: Strange Insert Problem "John K. Herreshoff" <jkherr@centurytel.net>
Re: Strange Insert Problem Martin Atukunda <matlads@dsmagic.com>
Re: Strange Insert Problem Bruno LEVEQUE <bruno.leveque@net6d.com>
Re: Strange Insert Problem Lola Lee <lola@his.com>
Hi,

First, in insert, every strings must be quoted. Your query becomes :

INSERT INTO YarnColortwo (yarn_id, yarn_color_nm, yarn_color_num, 
yarn_color_desc, yarn_color_lud) VALUES ( 15, 'Anemone', 616, 
'whatever', now() ).

Try this and report back.

Bruno



Lola Lee wrote:

> I'm having a really strange insert problem, which I cannot figure out.
>
> I have a table in my database, which I created using the following 
> query (I'm using Postgresql 7.4, if this helps):
>
> CREATE TABLE yarncolor (
>        yarn_color_id       SERIAL,
>        yarn_id             int NULL,
>        yarn_color_nm        varchar(35) NULL,
>        yarn_color_num       varchar(10) NULL,
>        yarn_color_desc      varchar(50) NULL,
>        discontinued_flg     boolean NULL,
>        yarn_color_lud       timestamp NULL,
>        PRIMARY KEY (yarn_color_id),
>        FOREIGN KEY (yarn_id)
>                              REFERENCES yarn
> );
>
> Everytime I try to insert a record in this table via ColdFusion 
> generated page, I get this error message (I also get this in 
> phpPgMyAdmin):
>
> SQL error:
> ERROR:  column "anemone" does not exist
>
>
> In statement:
> INSERT INTO YarnColortwo (yarn_id, yarn_color_nm, yarn_color_num, 
> yarn_color_desc, yarn_color_lud) VALUES ( 15, Anemone, 616, whatever, 
> now() )
>
> I'm at a loss as to why does Postgresql think there is a column named 
> "anemone".  Yes, I tried another string of character and get the same 
> message.  Anyone have an idea what may be going on?
>
>

-- 
Bruno LEVEQUE
System Engineer
SARL NET6D
bruno.leveque@net6d.com
http://www.net6d.com

В списке pgsql-novice по дате отправления
От: Lola Lee
Дата:
Сообщение: Strange Insert Problem
От: John K. Herreshoff
Дата:
Сообщение: Re: Strange Insert Problem
FAQ