Unix Technical Forum

load problem

This is a discussion on load problem within the Informix forums, part of the Database Server Software category; --> I am having a problem with loading a file to an informix database The file I am trying to ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 08:03 AM
Gary Cobden
 
Posts: n/a
Default load problem

I am having a problem with loading a file to an informix database

The file I am trying to load (dt2) is of the format:-
9845,593680,RAMANATHAN
3471,592812,QUIST-THERON

And I am trying to load it into a table with the following fields:-
patient Integer
refid Integer
consultant Char(30)

If I then run the following commands:-
load from "/home/cobdeng/sql/dt2" delimiter "," insert into diet_cons
;
unload to "/home/cobdeng/sql/dt2u" delimiter "," select * from
diet_cons;
select * from diet_cons;

The Select Statement tells me there are two rows retrieved, but
nothing displays on screen

If I cat the file dt2u I get the following:-
,845,593680,RAMANATHAN
,471,592812,QUIST-THERON

If I load values manually into the table, there is no problem

Can somebody help me with where I am going wrong please
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 08:04 AM
John Carlson
 
Posts: n/a
Default Re: load problem

On 10 Nov 2004 05:22:20 -0800, gary.cobden@nhs.net (Gary Cobden)
wrote:

>I am having a problem with loading a file to an informix database
>
>The file I am trying to load (dt2) is of the format:-
>9845,593680,RAMANATHAN
>3471,592812,QUIST-THERON
>
>And I am trying to load it into a table with the following fields:-
>patient Integer
>refid Integer
>consultant Char(30)
>
>If I then run the following commands:-
>load from "/home/cobdeng/sql/dt2" delimiter "," insert into diet_cons
>;
>unload to "/home/cobdeng/sql/dt2u" delimiter "," select * from
>diet_cons;
>select * from diet_cons;
>
>The Select Statement tells me there are two rows retrieved, but
>nothing displays on screen
>
>If I cat the file dt2u I get the following:-
>,845,593680,RAMANATHAN
>,471,592812,QUIST-THERON
>
>If I load values manually into the table, there is no problem
>
>Can somebody help me with where I am going wrong please


Sounds like there are some strange control characters in the unload
file. Where did the unload file come from?

JWC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:35 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com