I am sure this topic is discussed before or it is very elementary, however, I am trying to understand how would one handle ntext (16) in a unicode database/application in Datastage. I tried nvarchar with NLS enabled (UTF8) and its works fine in datastage wherever the string length is less than 2000, but warns when it is more than 2000 characters.
I would appreciate if someone please advice the concept of ntext how should I handle this situation.
Thanks.
Srinivas
nvarchar and ntext
Moderators: chulett, rschirm, roy
Re: nvarchar and ntext
There is one way to do this, we did everything in SQL server side using "Stuff" function. Using this function you can strip out the unwanted charaters like all the RTF formatting crap. Then load the converted data.
Alternatively you can try NCHAR and NVARCHAR2. These are used to store fixed-length and varying-length national character strings. Beginning with Oracle9i, they were redefined to be Unicode-only data types and can hold up to 2,000 and 4,000 characters (not bytes!) correspondingly. That means if you declare a column to be CHAR(100) it will allocate 100 bytes per column, but NCHAR(100) Unicode-based column requires 200 bytes.
-NB
Alternatively you can try NCHAR and NVARCHAR2. These are used to store fixed-length and varying-length national character strings. Beginning with Oracle9i, they were redefined to be Unicode-only data types and can hold up to 2,000 and 4,000 characters (not bytes!) correspondingly. That means if you declare a column to be CHAR(100) it will allocate 100 bytes per column, but NCHAR(100) Unicode-based column requires 200 bytes.
-NB
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ha, another one brainwashed by Oracle bin Larry! VARCHAR2 only exists in Oracle - the OP made no mention of Oracle.
NVarChar (the "Standard" representation) does use two bytes per character.
You (srinivas_dsx, and welcome aboard) can try using Long NVarChar for larger data. Or change the data type to VarChar (which will allow up to 4000 characters).
NVarChar (the "Standard" representation) does use two bytes per character.
You (srinivas_dsx, and welcome aboard) can try using Long NVarChar for larger data. Or change the data type to VarChar (which will allow up to 4000 characters).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 7
- Joined: Thu Nov 17, 2005 12:00 pm
Ray,ray.wurlod wrote:Ha, another one brainwashed by Oracle bin Larry! VARCHAR2 only exists in Oracle - the OP made no mention of Oracle.
NVarChar (the "Standard" representation) does use two bytes per character.
You (srinivas_dsx, and welcome aboard) can try using Long NVarChar for larger data. Or change the data type to VarChar (which will allow up to 4000 characters).
Thanks, I will use method you suggested and see what happens.
Srinivas