((DT_NUMERIC,7,0)REPLACE(["Aggregate Total Space"]," TB","")) * 1024
folks I have a colum "aggregate total space" that comes in as a varchar(50).
The values have word " TB" or " GB" or " MB" in them.
I am trying to remove these words, and convert this into a numeric value for reporting.
The default is GB. So if the data comes in as TB I multiply the result by 1024. if it comes in as MB then I divide it by 1024. If it comes in as a GB i just convert it and let it pass.
When I run this command I get the following error.
[Removing Reference for " GB" ] Error: An error occurred while attempting to perform a type cast.
Can somebody help me?
Paresh Motiwala Manager of Data Team, Big Data Enthusiast, ex DBA