Currently have a derived column as part of a dataflow to help combat spaces
and blanks when converting data types.
example:
derived column 1: (DT_I4)[DUEQTY] if the column can't be converted it
redirects the row then another derived column process uses (DT_I4)0
I have this concept on three columns within the table.
if there are only errors on one of the columns it redirects the whole row
and changes all values to zero.
How do I combat this? I think i'm looking for a derived column variable
statment that is similiatr to the if(iserror(statement),"",(statement)) in
Excel
Milk BottleHi
Is it SQL Server's statement? Can you show us?
"MilkBottle" <MilkBottle@.discussions.microsoft.com> wrote in message
news:57051AEA-0342-4A9B-B67F-E42FB34B0036@.microsoft.com...
> Currently have a derived column as part of a dataflow to help combat
> spaces
> and blanks when converting data types.
> example:
> derived column 1: (DT_I4)[DUEQTY] if the column can't be converted it
> redirects the row then another derived column process uses (DT_I4)0
> I have this concept on three columns within the table.
> if there are only errors on one of the columns it redirects the whole row
> and changes all values to zero.
> How do I combat this? I think i'm looking for a derived column variable
> statment that is similiatr to the if(iserror(statement),"",(statement)) in
> Excel
> --
> Milk Bottle|||> if there are only errors on one of the columns it redirects the whole row
> and changes all values to zero.
Rather than set all values to zero, set only the problem column (e.g.
column1) to zero. Connect the outputs of both column1 derrived columns to a
Union All so that both good and fixed records continue down the pipeline.
Repeat this for the remaining columns you want to scrub.
Hope this helps.
Dan Guzman
SQL Server MVP
"MilkBottle" <MilkBottle@.discussions.microsoft.com> wrote in message
news:57051AEA-0342-4A9B-B67F-E42FB34B0036@.microsoft.com...
> Currently have a derived column as part of a dataflow to help combat
> spaces
> and blanks when converting data types.
> example:
> derived column 1: (DT_I4)[DUEQTY] if the column can't be converted it
> redirects the row then another derived column process uses (DT_I4)0
> I have this concept on three columns within the table.
> if there are only errors on one of the columns it redirects the whole row
> and changes all values to zero.
> How do I combat this? I think i'm looking for a derived column variable
> statment that is similiatr to the if(iserror(statement),"",(statement)) in
> Excel
> --
> Milk Bottle
No comments:
Post a Comment