Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

putting a value in for null Expand / Collapse
Author
Message
Posted Wednesday, August 6, 2014 3:09 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 4:21 AM
Points: 123, Visits: 201
i have rows in a field that are causing me a problem and I think its because its set to numeric and some of the rows are blank.

would this put a value into the field for me if im using a derived box

ISNULL([Fixed Rate]) ? "0.00" : [Fixed Rate]

it just doesn't seem to put the 0.00 into the field
Post #1600104
Posted Wednesday, August 6, 2014 3:24 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:23 AM
Points: 12,954, Visits: 10,724
What data type is Fixed Rate?



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1600108
Posted Wednesday, August 6, 2014 3:30 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 4:21 AM
Points: 123, Visits: 201
its coming from text file so its a string
Post #1600114
Posted Wednesday, August 6, 2014 3:45 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:23 AM
Points: 12,954, Visits: 10,724
ronan.healy (8/6/2014)
its coming from text file so its a string


Any errors when running the package?
How do you verify if the NULL values have been replaced?




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1600118
Posted Wednesday, August 6, 2014 3:48 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 4:21 AM
Points: 123, Visits: 201
ya was getting errors and I used a datagrid view to look at the data but this fixed my problem

ISNULL([Fixed Rate]) || [Fixed Rate] == "" ? "0.00" : [Fixed Rate]
Post #1600120
Posted Wednesday, August 6, 2014 3:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:23 AM
Points: 12,954, Visits: 10,724
ronan.healy (8/6/2014)
ya was getting errors and I used a datagrid view to look at the data but this fixed my problem

ISNULL([Fixed Rate]) || [Fixed Rate] == "" ? "0.00" : [Fixed Rate]


Ah yes. If a field is empty in the source, SSIS will by default make it an empty string, not NULL.
You can change this behaviour in the Flat File source by checking the checkbox for "Retain null values from the source as null values in the data flow".




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1600122
Posted Wednesday, August 6, 2014 4:28 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 4:21 AM
Points: 123, Visits: 201
o ya forgot I could do it there
thanks for that
Post #1600133
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse