String with proceeding decimal
Want to take a string I have coming in for example '2000.39-' and change it into a decimal so that it shows -2000.39, was hoping to use a derived column transfer, just having an issue with figuring out how to put it together.
October 21st, 2010 6:35pm

Is it coming from SQL - if it is you could do this in the select- SELECT Cast('-' + Left(Replace (columnName,'''',''),Len(columnName)-1) as decimal(6,2)); http://lqqsql.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 6:51pm

Use this expression: (DT_R4)(RIGHT(Num,1) + SUBSTRING(Num,1,LEN(Num) - 1))Nitesh Rai- Please mark the post as answered if it answers your question
October 21st, 2010 6:52pm

Is it coming from SQL - if it is you could do this in the select- SELECT Cast('-' + Left(Replace (columnName,'''',''),Len(columnName)-1) as decimal(6,2)); http://lqqsql.wordpress.com Its coming from a flat file
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 7:17pm

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

Other recent topics Other recent topics