Im moving data from source type CHAR40 To target type CHAR10.
When I load the data into SQLSERVER im getting an Warning message -
Ref_T63GS02_Load_S_T_US_v6..Transformer_2.DSLink4: DSD.BCIPut call to SQLExecute returned informational message.
SQLSTATE=01004, DBMS.CODE=0
[DataStage][SQL Client]Data has been truncated
Job runs successfully but for every row there is the above message in Director.
Char40 to Char10
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
Are you trimming the data? If a varchar 40 is loaded (in your source) with trailing spaces, the spaces will remain. Usually you want to trim those off. Even after that, you should only use the first 10 characters in your target field. The syntax for that is [1,10] on the output derivation of the incoming field.
John
John
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you do want the database to perform the truncation, specify it as CHAR(10) and extract it using the SUBSTRING function in SQL.
Otherwise extract as Char(40) and use an appropriate function (such as Left()) or a substring operator to obtain the leftmost 10 characters.
In all of this, although you did not specify, I have assumed you simply want to discard the remaining 30 characters. For you simply can not shoehorn 40 characters into a Char(10) field.
Otherwise extract as Char(40) and use an appropriate function (such as Left()) or a substring operator to obtain the leftmost 10 characters.
In all of this, although you did not specify, I have assumed you simply want to discard the remaining 30 characters. For you simply can not shoehorn 40 characters into a Char(10) field.
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.