Currency format in SSIS

I want to  output columns in a sql table to a text file in SSIS.  The price column is money  
like 9877.21 but  it should look like $      9877.21 in the text file
Nana HemaaAsked:
Who is Participating?
 
Vikas GargConnect With a Mentor Business Intelligence DeveloperCommented:
Hi,

Replace for id column will not work since id column in not varchar and the output of derived column is varchar.

and for spaces you can add space near the $ sign

"$     " + (DT_STR,10,1252)id
0
 
Vikas GargBusiness Intelligence DeveloperCommented:
Hi,

You can use Derived Column and convert the Money to Varchar and Concatenate it with $ Symbol

Expression will be like this "$ " + (DT_STR,10,1252)MoneyColumn
0
 
Nana HemaaAuthor Commented:
getting invalid expression
0
 
Nana HemaaAuthor Commented:
run ok but ouput in text file did not change.  I want 5 leading spaces after the $   sign
like $      9877.21 .  I added derived column but still gets 9877.21.   I replaced the column name price in the derived column
0
 
Harish VargheseProject LeaderCommented:
Above solution should work. Post a screenshot of the derived column setup.
0
All Courses

From novice to tech pro — start learning today.