Solved

convert string to int ssis and do calculation

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

785 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