knamc99
asked on
URGENT!! DT_STR Expression not working correctly
I have a derived column in SSIS and I am using the following expression:
Derived Column is "SERVER_CODE" Expression (DT_STR,1,1252)(UPPER(SUBS TRING(@[Us er::varRxF ile],108,1 )))
My Variable pulls the file name from a FOR LOOP Sequence, the Filenames are as follows:
Server_A_RX_IN_20160101.tx t
Server_B_RX_IN_20160101.tx t
Server_C_RX_IN_20160101.tx t
So the Server_Codes need to go to my table as A, B, C currently it is returning "R" for all files???
New to expressions using 1252 code page
Derived Column is "SERVER_CODE" Expression (DT_STR,1,1252)(UPPER(SUBS
My Variable pulls the file name from a FOR LOOP Sequence, the Filenames are as follows:
Server_A_RX_IN_20160101.tx
Server_B_RX_IN_20160101.tx
Server_C_RX_IN_20160101.tx
So the Server_Codes need to go to my table as A, B, C currently it is returning "R" for all files???
New to expressions using 1252 code page
ASKER
I don't know what the 108 means? I have adjusted it, just randomly and I got Characters not in the file name?
What are the actual varRxFile values because none of those you posted has 108 characters which would result in an error or NULL value with the ones you listed?
ASKER
Those file names are what the varRXFile is?? At the most 2 bits per character, I am thinking 46 at the most?? I am new to the substring expressions.
The strange thing is it has been working fine until today?? Files name formats haven't changed or the variable, so I am pretty stumped?
The strange thing is it has been working fine until today?? Files name formats haven't changed or the variable, so I am pretty stumped?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am doing testing and changed the directory that the files is residing in.
ASKER
Thank you, when I moved the file to the new directory that is what is was. The connection for the file was fully qualified.
At a guess, and not sure which r the expression is picking up, but might need to adjust the 108 I the substring expression.
HTH
David