SolvedPrivate

Using Derived Column Transformation Editor to populate 0 if the incoming value is null

Posted on 2014-09-12
4
27 Views
Last Modified: 2016-02-13
i have the expression. I know this is a form for text type fields. i have a numeric field. IS this not the right syntax ?

ISNULL([_per_aban]) 0: [_per_aban]
0
Comment
Question by:basile
  • 2
4 Comments
 
LVL 48

Assisted Solution

by:PortletPaul
PortletPaul earned 250 total points
ID: 40319608
ISNULL ( check_expression , replacement_value )

ISNULL( [_per_aban] , 0 )

see: http://msdn.microsoft.com/en-us/library/ms184325.aspx

{+edit} That's for TSQL
are you asking for SSIS?
0
 
LVL 1

Author Comment

by:basile
ID: 40319716
yes, i'm talking about SSIS. the transformation editor
0
 
LVL 1

Author Comment

by:basile
ID: 40319825
wha't i'm trying to do, is read a .csv file. If the value is null, just replace with 0.

the incoming value is null, which causes problems getting into a numeric column (even though i allow nulls). I'm using this without error:

ISNULL(SL) ? 0 : (DT_NUMERIC,18,0)SL --On the fly conversion from string to numeric

however, when I run the package, i get the below error

[Derived Column [2719]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "component "Derived Column" (2719)" failed because error code 0xC0049063 occurred, and the error row disposition on "output column "_SL" (2791)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
0
 
LVL 21

Accepted Solution

by:
Alpesh Patel earned 250 total points
ID: 40336383
In Derived column

Create nwe Column and write expression.


 (DT_NUMERIC,18,0)(ISNULL([IncomingColumn]) ? 0 : [IncomingColumn])
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
combining condition to rerun if failure within BEGIN..END 27 87
Authentication error 1 39
SQL Query 3 48
Where to download and how to install sqldmo.dll 5 34
Lessons learned during ten years of interviewing for SQL Server Integration Services (SSIS) and other Extract-Transform-Load (ETL) contract roles and two years of staff manager interviewing contractors.
My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

21 Experts available now in Live!

Get 1:1 Help Now