KUS


I would like to know how can i use derived column to covert the scrip that use to transformation column in DTS 2000(i've migrate my dts to ssis) i didn't know what function can check the numeric in ssis.

My scrip in transformation in dts 2000 as follow.
Function Main()
if isnumeric(DTSSource("Col012")) then
DTSDestination("SH") = int( DTSSource("Col012"))
else
DTSDestination("SH") = DTSSource("Col012")
end if
Main = DTSTransformStat_OK
End Function

Any suggestion please let's me know.

Thanks.

Best Regards,

Kus




Re: How to check numeric in Derived column?

DarrenSQLIS


There is no ISNUMERIC function available in the SSIS expression syntax.

Looking at your script is a bit strange, why convert to an integer if you can, why not just leave it alone

You could perhaps use a simple cast to DT_I4 (integer type), and use the error support, redirecting the rows that fail, and then hanlde them in a second transform. Using error flows is a very powerful too, and don't think of errors as always being bad, think useful condition instead.







Re: How to check numeric in Derived column?

Phil Brammer

To add to Darren... The way you have your scenario written, you can't store both an integer data type and a non-integer data type in the same SSIS field. The meta data wouldn't be the same.






Re: How to check numeric in Derived column?

KUS

Many thanks for  all suggestions .   it's very helpful for me.

Best Regards,

Kus.