Solved

convert string to int ssis and do calculation

Posted on 2009-07-14
2
946 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

733 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