Solved

convert string to int ssis and do calculation

Posted on 2009-07-14
2
926 Views
Last Modified: 2013-11-10
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?
SSIS.jpg
0
Comment
Question by:PeterErhard
2 Comments
 
LVL 26

Accepted Solution

by:
Chris Luttrell earned 350 total points
ID: 24856398
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

0
 
LVL 26

Assisted Solution

by:tigin44
tigin44 earned 150 total points
ID: 24857035
you are using the long int data type and this would be suitable for your conversion

(DT_I8) @[User::FreeSpace] / 1048576
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

747 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

13 Experts available now in Live!

Get 1:1 Help Now