How to convert DT_WSTR of length=1  to DT_STRING of length=10
source data type was unicode[DT_WSTR ] length was 255. so this query worked... [M/F] == (DT_STR,50,1252)"M" ? "MALE" : [M/F] == (DT_STR,50,1252)"F" ? "FEMALE" : "NA" but for source data type is unicode[DT_WSTR ] length is 1.what should be the querry???how to solve length issuemhassanshahbaz
November 23rd, 2010 6:32am

Use Data Conversion Transformation after your source and change the datatype to DT_STR and specify length in this. Hope this will work.
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 6:37am

Create a new Column in Derived Column, put you Expression in and set the Datatype to dt_string with the length of 10 This new column direct to your destination column
November 23rd, 2010 6:37am

i triedin new Column in Derived Column Gender == "1" ? "MALE" : Gender == "0" ? "FEMALE" : "NA" but i gave NULL valuesmhassanshahbaz
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 6:51am

This works fine in my test: gender == "1" ? "Male" : gender == "0" ? "Female" : "NA"
November 23rd, 2010 7:05am

in replace gender Gender == (DT_STR,6,1252)"1" ? "MALE" : Gender == (DT_STR,6,1252)"0" ? "FEMALE" : "NA" but it also gave NULL valuesmhassanshahbaz
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 7:13am

Gender == "1" ? "Male" : Gender == "0" ? "Female" : "NA" i tried it but its giving NULL :Smhassanshahbaz
November 23rd, 2010 7:16am

Please put a Dataviewer before and after the Derived Column. Did you direct the new column with your destination?
Free Windows Admin Tool Kit Click here and download it now
November 23rd, 2010 7:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics