Page 1 of 1

VARCHAR data load Vs NVARCHAR data load using DataStage 8.0

Posted: Mon Jun 27, 2011 1:06 pm
by jagadam
My target DB is a SQL Server and few columns on these tables are defined as NVARCHAR. the tables should be able to support characters from any character set, not just the Latin alphabet. Nvarchar can do this, since it stores each character in a 2-byte representation, rather than a 1-byte representation, as with varchar.

My problem is, if I am loading the VARCHAR defined data from seqencial file to the DB - NVARCHAR column, the last byte of the data is truncated(only the last byte whatever is the real lenght of the data).

If I change the column definition of the SQL server DB to VARCHAR, the data is loading fine, but as of now the data is for North America, so all is well for now, but the same should work for Europe and Asia Pacific language Character set.

Please help in understanding and resolving this..

Posted: Mon Jun 27, 2011 3:23 pm
by ray.wurlod
Please expand on what you mean by "Europe and Asia Pacific language character set".

Posted: Mon Jun 27, 2011 4:03 pm
by jagadam
if the source data from other geographical regions contain different character set other than English, the target table should accomodate that.

Posted: Thu Jun 30, 2011 8:30 am
by jagadam
Any suggessions on this please..

Posted: Thu Jun 30, 2011 4:36 pm
by ray.wurlod
Assuming you have imported the table definition and then loaded it into the job, it should work OK.

If you're worried about accented characters and the like, use one of the maps that handle these such as UTF-8 or ISO8859-1 (depending on the character set used to encode your actual data).