My job aborts even Im trimming varchar60 to 1,40 when writing to target type varchar40.
Do I use something like varchar0 convert function for this too as best practice?
varchar60 to varchar40
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I'd probably use Left(InLink.TheString,40) - since I think it's better "self documentation" - but only after consulting the business to obtain a business rule to govern the situation that Len(InLink.TheString) > 40.
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.
I have certain moves from varchar(60) to varchar(40) and some char(30) to char(40) and I have applied left(colname,40) and left(colname,30). It still fails with the message below on SQl server 2005 in DS-
APT_CombinedOperatorController,0: [DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
APT_CombinedOperatorController,0: [DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
I changed the column lengths to be equal on source and target side.
I still get the same error -
APT_CombinedOperatorController,0: [DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
I still get the same error -
APT_CombinedOperatorController,0: [DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation
[DataDirect][ODBC SQL Server Driver]String data, right truncation