[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

DT_WSTR dropping value before decimal point in SSIS

Posted on 2010-08-25
2
Medium Priority
?
749 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 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
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

873 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