Data Truncation Warning

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
urshit_1983
Participant
Posts: 73
Joined: Wed Jun 28, 2006 3:27 pm
Location: NJ

Post by urshit_1983 »

Explain in detail so we can get idea. wot u want exactly ?

Is the string a part of any of ur field and you want to retain the whole string ??
"Nobody is expert in Everything,
But Everybody is expert in Something."
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You are getting a Data Truncation warning from DataStage or SQL Server? Can you post the actual warning?
-craig

"You can never have too many knives" -- Logan Nine Fingers
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

I want to avoid the Warning message. My problem is, Even though I am doing a substring and a trim, I am getting data truncation warning. Why is this happening, am I missing many things here..

Is the string a part of any of ur field and you want to retain the whole string ??

Yes, I would like to retain this unless its not possible..

Thanks,
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

chulett wrote:You are getting a Data Truncation warning from DataStage or SQL Server? Can you post the actual warning?

TestConsumer..stgxConsumer.lnkInsertConsumer: DSD.BCIPut call to SQLExecute returned informational message.
SQLSTATE=01004, DBMS.CODE=0
[DataStage][SQL Client]Data has been truncated

Chulet-- pls let me know if more information is needed
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Which stage are you using to connect to SQLServer?
Kris

Where's the "Any" key?-Homer Simpson
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your issue is on the SQL Server side. The size of the data in the job itself isn't an issue or you would get a different warning. Meaning, you've defined it as a Varchar(255) in the job and the data there isn't greater than 255 characters.

So, that could mean a couple of things. The actual target field in SQL Server is smaller than that, so the database catches the error not the job. The other thing might be an NLS issue, where single characters in your source become multiple characters. What are your NLS_LANG settings in DataStage versus your target database?
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

The issue is certainly at the database end. It allows a certain amount of bytes but more is being inserted. Its just a warning and i believe the data is getting inserted. Check the table and see at what point it chops off the rest of the data.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kommven
Charter Member
Charter Member
Posts: 125
Joined: Mon Jul 12, 2004 12:37 pm

Post by kommven »

Try

Code: Select all

Oconv(description,"MCP")[0,200]
and increase the value till you get error and fix it...
Post Reply