[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sapdb-general
Subject:    RE2: repmcli and Long Unicode fields
From:       "Schildberg, Steffen" <steffen.schildberg () sap ! com>
Date:       2001-11-29 9:33:28
[Download RAW message or body]

> [Simon Fox wrote some time ago concerning
>   repmcli and Long Unicode fields]
> 
> 
> I have a table which contains a LONG ASCII column and need to 
> export it
> to a corresponding table in another database which is 
> UNICODE. The LONG
> column in the destination UNICODE database is therefore 
> UNICODE and not
> compatible with the source table's LONG ASCII column.
> Is there anyway to get the LONG data from the non UNICODE source
> database to the UNICODE destination database? 
> 
> I have tried repmcli but it reports the following error:
> 
> Error during execution
> -->-25010
> SQL error -3989 = Invalid long column length (error position: 3)
> 
> If I define the column in the destination table as LONG ASCII 
> instead of
> LONG UNICODE, it works fine.
> 
> Failing this, is there anyway to upgrade an ASCII LONG column to a
> UNICODE LONG column, Alter table doesn't allow it?
> 
> 
> Thanks,
> Simon Fox
> 

We've solved the problem with direct mailing but I will provide it
here for the community, too.
The solution is quite simple:

The problem consisted of not publishing enough information.
The command used by Simon looks like this

DATALOAD TABLE tblContent 
          id              1 
          name            2
          body            3 
          typeid          4 
          locale          5 
          modifytimestamp 6
          active          7
          activetimestamp 8
INFILE 'tblContent.dat' 
LONGFILE body 'body.dat'

and the db is UNICODE. No information is given about the encoding of the
long file. In case no encoding type is given in the command the server
derives it from the db column type - which is UNICODE in this case.
The server simply assumes the data read from data file is already UNICODE.
To prevent this the command should be changed to

DATALOAD TABLE tblContent 
          id              1 
          name            2
          body            3 
          typeid          4 
          locale          5 
          modifytimestamp 6
          active          7
          activetimestamp 8
INFILE 'tblContent.dat' 
LONGFILE body 'body.dat' ASCII

and everything works fine.
Unfortunately the server treats the default encoding types of longfile and
infile differently. In case of infile and not defined encoding type the
server sets it to ASCII whereas in case of longfile
it derives it from the db column data type.
I'll change that to the same behavior of both file types.

Steffen
-- 
Steffen Schildberg
SAP DB Team
SAP Labs Berlin
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic