SQL SERVER - Character missing in Datasatge

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
parameswar
Premium Member
Premium Member
Posts: 66
Joined: Sun Apr 08, 2007 12:34 pm

SQL SERVER - Character missing in Datasatge

Post by parameswar »

Hi,

We are extracting data from SQL Server using odbc stage. In datastage we are getting data , but from few fields it is truncating one or Two characters. If we will extract data by appending one or two character, we are getting correct data in datastage

Example: Instead of RES_CODE if we will retrive as below data is coming fine otherwise it is truncating last one character . similarly in case of two missing character we have to append two spaces.
LTRIM(RTRIM(RES_CODE + ' ' )) AS RES_CODE

What might be the reason for it? Can we retrive data without appending spaces in field ?

Thanks,
Parameswar
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Could this be a data type issue, such as moving a CHAR column to a VARCHAR column?
parameswar
Premium Member
Premium Member
Posts: 66
Joined: Sun Apr 08, 2007 12:34 pm

Post by parameswar »

chucksmith wrote:Could this be a data type issue, such as moving a CHAR column to a VARCHAR column?
Hi,

Even if I am changing datatype from char to varchar , I am missing one character from last of the column :( . Is there any other reason for this truncation...

Thanks,
Parameswar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is this through ODBC and, if so, what is the total size of the row? There is a tunable limit (MAXFETCHBUFF) to row size in Data Direct ODBC drivers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
parameswar
Premium Member
Premium Member
Posts: 66
Joined: Sun Apr 08, 2007 12:34 pm

Post by parameswar »

ray.wurlod wrote:Is this through ODBC and, if so, what is the total size of the row? There is a tunable limit (MAXFETCHBUFF) to row size in Data Direct ODBC drivers.


Hi Ray,

I am using ODBC to extract data from SQL server. Last characters are truncationg from few fields, not from all fields. Could you please help me how to know the limit of MAXFETCHBUFF if I can change the default value and will try.

Thanks,
Parameswar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The default value of MAXFETCHBUFF is 8192 (bytes). I am not aware of any limit. However, if characters are being truncated from multiple fields, it is not MAXFETCHBUFF that is at fault.

Can you enable ODBC tracing, and determine what SQL is being sent to the database server and what data are being sent from the database server? Tip: restrict the number of rows process, lest your trace file becomes too huge.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply