convert string to int ssis and do calculation

I'm trying to do the following through the Dervived Column component but running into problems.

How can I convert the value to int and divide by 1048576?
Who is Participating?
Chris LuttrellConnect With a Mentor Senior Database ArchitectCommented:
try this, you have to convert the Variable to some numeric type that is compatible with the / operator and with the denominator which is of type (DT_I4) also.
(DT_I4) @[User::FreeSpace] / 1048576

Open in new window

tigin44Connect With a Mentor Commented:
you are using the long int data type and this would be suitable for your conversion

(DT_I8) @[User::FreeSpace] / 1048576
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.