SolvedPrivate

Currency format in SSIS

Posted on 2014-07-29
5
32 Views
Last Modified: 2016-02-11
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
0
Comment
Question by:Nana Hemaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 15

Expert Comment

by:Vikas Garg
ID: 40228407
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
 

Author Comment

by:Nana Hemaa
ID: 40228438
getting invalid expression
0
 

Author Comment

by:Nana Hemaa
ID: 40228460
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
 
LVL 12

Expert Comment

by:Harish Varghese
ID: 40228469
Above solution should work. Post a screenshot of the derived column setup.
0
 
LVL 15

Accepted Solution

by:
Vikas Garg earned 500 total points
ID: 40228475
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

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question