Hi,
I'm importing data where some of the fields contain F and T. After looking at it once it's read in some of the values, specifically Fs and Ts, have been converted to True and False.
Is there a recommend way of dealing with this? I've so far gone for selecting it and converting it to a string of size 1 which returns the truncation warning.
Is this the best method?
Many thanks,
Solved! Go to Solution.
Hi @josephhw
Does your field only contain these strings (F or T)?
Where does your data come from? (Excel File, SQL, CSV)
Cheers,
I don't know if this is the best way, but an alternative solution would be converting the Field to a String and using the Formula - Left([Field], 1)
Cheers,
Hey,
Yes the field only contained Fs and Ts! I have had it as an issue doing a raw text input tool and from Excel
Yes, you'll definetely have some trouble if you're using the Text Input tool, it will automatically identify the field as a Boolean, and when you convert it back to a String, it sees it as False or True.
But the good thing is if you insert a space before or after your F/T string, it sees it as a string again. Then you could use either the Data Cleansing Tool or the Trim function to get rid of this whitespace.
Or you could use a dummy string in the 1st row and use the Sample Tool with the Skip 1st option.
Details that can make our life a bit harder.
Cheers,
Great! Two easy solutions!
Thanks a lot. Will probably go for the dummy string!