Solved

DT_WSTR dropping value before decimal point in SSIS

Posted on 2010-08-25
2
698 Views
Last Modified: 2013-11-10
I'm trying to convert a value less than 1 e.g. 0.34 in to a string variable using DT_WSTR in a derived column transformation and it gets converted to ".34" rather than "0.34". How do I fix this please?
0
Comment
Question by:Grffster
  • 2
2 Comments
 
LVL 16

Accepted Solution

by:
vdr1620 earned 125 total points
Comment Utility
Try converting it in your SQL Statement using Convert(Varchar(Length),ColumnName)..If your using any other Source..
 Try this ((ColumnName)< 1) ? "0"+ (DT_wstr,Length)(ColumnName) : (DT_wstr,Length)(ColumnName)


 
0
 
LVL 16

Expert Comment

by:vdr1620
Comment Utility
use the above expression in your derived column by adding it as a new column and Map this column in your destination
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now