[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

convert string to int ssis and do calculation

Posted on 2009-07-14
2
Medium Priority
?
964 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
Chris Luttrell earned 1400 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 600 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

656 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