How to Unload char with spaces
Posted in 1999
Topics: Migration, Import/Export & Data Conversion
Good day.
I am facing problem with UNLOAD SQL statement.
My table structure is
create table tbRemark (
SiteID char(2),
Remark1 char(100),
Remark2 char(100)
)
My data is
SiteID :"01"
Remark1:"*** a) Please response to the Schedule Order Release within 48hrs
upon receipt."
Remark2:" 2) If this is an autofax transmission, initial/approval is not
required."
The unloaded text file is
01|*** a) Please response to the Schedule Order Release within 48hrs upon
receipt.|2) If this is an autofax transmission, initial/approval is not
required.|
When I dropped the table, recreate the table and then load the data back, my
data has become
SiteID :"01"
Remark1:"*** a) Please response to the Schedule Order Release within 48hrs
upon receipt."
Remark2:"2) If this is an autofax transmission, initial/approval is not
required."
##Which caused the remarks out of alignment##
How to avoid this problem? Any help would very much apprectiated. Thanks in
advance.
Regards,
Jouhshen Toh
A n a l y s t P r o g r a m m e r, I T S S
Solectron Technology Sdn. Bhd.
Email: jouhshentoh@pg.slr.com
JouhShenToh@pg.SLR.com wrote:
>
> Good day.
>
> I am facing problem with UNLOAD SQL statement.
>
> My table structure is
> create table tbRemark (
> SiteID char(2),
> Remark1 char(100),
> Remark2 char(100)
> )>
> My data is
>
> SiteID :"01"
> Remark1:"*** a) Please response to the Schedule Order Release within 48hrs
> upon receipt."
> Remark2:" 2) If this is an autofax transmission, initial/approval is not
> required."
>
> The unloaded text file is
>
> 01|*** a) Please response to the Schedule Order Release within 48hrs upon
> receipt.|2) If this is an autofax transmission, initial/approval is not
> required.|
>
> When I dropped the table, recreate the table and then load the data back, my
> data has become
>
> SiteID :"01"
> Remark1:"*** a) Please response to the Schedule Order Release within 48hrs
> upon receipt."
> Remark2:"2) If this is an autofax transmission, initial/approval is not
> required."
>
> ##Which caused the remarks out of alignment##
>
> How to avoid this problem? Any help would very much apprectiated.
> Thanks in advance.
Since the UNLOAD file is missing the leading blanks, there is
apparently a bug in the UNLOAD operation. You should report this
to Informix, with the example as given and details of platform and
software versions.
As a workaround, you can consider using the SQLCMD program from the
IIUG web site, or using an alternative Informix-supplied unloading
program. You don't indicate whether it is ISQL or DB-Access or I4GL
which is giving you the trouble.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>