?
Solved

DT_WSTR dropping value before decimal point in SSIS

Posted on 2010-08-25
2
Medium Priority
?
740 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
[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 Comments
 
LVL 16

Accepted Solution

by:
vdr1620 earned 500 total points
ID: 33521780
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
ID: 33521790
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

741 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