Thread: Re: Insert into:Bad date external representation

Re: Insert into:Bad date external representation

From
azwa@nc.com.my
Date:
<br /><font face="Times New Roman" size="2">Hi,</font><br /><br /><br /><font face="Times New Roman" size="2"> got an
erroras below :</font><br /><br /><font face="Times New Roman" size="2">   dwnc=> insert into
biosadm.custdo_dim</font><br/><font face="Times New Roman" size="2">dwnc->
 (do_key,do_no,do_date,attnto,custlo)</font><br/><font face="Times New Roman" size="2">dwnc->  select
nextval('cdo_seq'),c.dono::varchar,c.dodate::date,</font><br/><font face="Times New Roman" size="2">dwnc-> c.attnto,
c.custlo from custdo_temp c;</font><br /><font face="Times New Roman" size="2">ERROR:  Bad date external representation
''</font><br/><br /><br /><font face="Times New Roman" size="2">Table structure (custdo_dim) :   </font><br /><br
/><fontface="Times New Roman" size="2">dwnc(> \d custdo_dim</font><br /><font face="Times New Roman" size="2">     
           Table "biosadm.custdo_dim"</font><br /><font face="Times New Roman" size="2"> Column  |  Type   |          
     Modifiers</font><br /><font face="Times New Roman"
size="2">---------+---------+-------------------------------------------</font><br/><font face="Times New Roman"
size="2"> do_key | integer | not null default nextval('cdo_seq'::text)</font><br /><font face="Times New Roman"
size="2"> do_no  | text    |</font><br /><font face="Times New Roman" size="2"> do_date | date    |</font><br /><font
face="TimesNew Roman" size="2"> custlo  | text    |</font><br /><font face="Times New Roman" size="2"> attnto  | text  
 |</font><br/><font face="Times New Roman" size="2">Indexes: custdo_dim_pkey primary key btree (do_key)</font><br /><br
/><br/><font face="Times New Roman" size="2">Table structure(custdo_temp):</font><br /><br /><font face="Times New
Roman"size="2"> Table "biosadm.custdo_temp"</font><br /><font face="Times New Roman" size="2">  Column  | Type |
Modifiers</font><br/><font face="Times New Roman" size="2">----------+------+-----------</font><br /><font face="Times
NewRoman" size="2"> dono     | text |</font><br /><font face="Times New Roman" size="2"> dodate   | text |</font><br
/><fontface="Times New Roman" size="2"> custname | text |</font><br /><font face="Times New Roman" size="2"> custlo   |
text|</font><br /><font face="Times New Roman" size="2"> attnto   | text |</font><br /><br /><font face="Times New
Roman"size="2">pls help me thanks</font> 

Re: Insert into:Bad date external representation

From
Michael Glaesemann
Date:
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