Re: Insert into:Bad date external representation

Поиск
Список
Период
Сортировка
Искать

Re: Insert into:Bad date external representation

От:
azwa@nc.com.my
Дата:

Hi,


 got an error as below :

   dwnc=> insert into biosadm.custdo_dim
dwnc->  (do_key,do_no,do_date,attnto,custlo)
dwnc->  select nextval('cdo_seq'),c.dono::varchar,c.dodate::date,
dwnc-> c.attnto, c.custlo  from custdo_temp c;
ERROR:  Bad date external representation ''


Table structure (custdo_dim) :  

dwnc(> \d custdo_dim
                  Table "biosadm.custdo_dim"
 Column  |  Type   |                 Modifiers
---------+---------+-------------------------------------------
 do_key  | integer | not null default nextval('cdo_seq'::text)
 do_no   | text    |
 do_date | date    |
 custlo  | text    |
 attnto  | text    |
Indexes: custdo_dim_pkey primary key btree (do_key)


Table structure(custdo_temp):

 Table "biosadm.custdo_temp"
  Column  | Type | Modifiers
----------+------+-----------
 dono     | text |
 dodate   | text |
 custname | text |
 custlo   | text |
 attnto   | text |

pls help me thanks

Re: Insert into:Bad date external representation

От:
Michael Glaesemann <grzm@myrealbox.com>
Дата:
On Jan 14, 2004, at 4:39 PM, azwa@nc.com.my wrote:
>  got an error as below :
>
>    dwnc=> insert into biosadm.custdo_dim
> dwnc->  (do_key,do_no,do_date,attnto,custlo)
> dwnc->  select nextval('cdo_seq'),c.dono::varchar,c.dodate::date,
> dwnc-> c.attnto, c.custlo  from custdo_temp c;
> ERROR:  Bad date external representation ''
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here's your clue right here: It means the dodate text field in 
custdo_temp contains data that does not represent a valid date. Check 
to make sure custdo_temp.dodate is all properly formatted.

HTH

Michael Glaesemann
grzm myrealbox com


FAQ