score:2
The SSIS variable designer did not, in my case, show the Decimal or Numeric data types to select to place my decimal(18,2) value into.
I changed my variable to Object, and was able to read the Decimal(18,2) value from the result set of one stored proc, and pass it as a parameter with type Money to a second SP.
So I would use "Object" if you cannot find a type in the variable list that works for you.
Read More
- What is the most appropriate data type for storing an IP address in SQL server?
- What native dotNet data type is most appropriate for conveying SQL Server hierarchyId values?
- Appropriate .Net data type for decimal(20,0)
- Why do I get the error "Xml data type is not supported in distributed queries" when querying a linked server for non-xml data?
- Sql Data Type for Primary Key - SQL Server?
- UPDATE error: "Argument data type text is invalid for argument 1 of REPLACE"
score:0
.NET decimal has methods decimal.ToInt64(), decimal.ToInt32() etc.
score:0
A float or a decimal would be my recommendation.
Similar Question and Answer
- Which data type should be used for saving images in database?
- Sql Table data type for email address?
- What is the data type for barcodes?
- Operand data type time is invalid for avg operator...?
- SQL Server query to get data type for all columns in table?
- Best data type for storing strings in SQL Server?
- Data Type Chosen by SQL Server for Null Column
- Wrong data type returned for date in jtds.jar
score:0
A SQL decimal(20,0) has a precision of 20 which equates to 13 bytes of storage. The .Net decimal is 16 bytes and should work.
score:0
You would need to convert the SQL data type to an Int64 prior to putting it into a Int64 package variable.
How are you getting it, as an output parameter?
In a dataflow, you would obviously read it into a decimal/numeric and then convert to Int64 in a Data Conversion component.
If you're trying to directly map an output parameter from an Execute SQL Command task, you'll probably have to use a temporary object package variable and then convert it in a script task into the real Int64 package variable.
score:1
SSIS does have Decimal and Numeric types. You can use either of these and it'll go through (except maybe on a Union All, where you should make sure they're the same precision and scale).
See more about data types here.
score:2
Have you tried Decimal yet?
More questions
- SQL Server performance for alter table alter column change data type
- what type of data type use for year and month?
- Operand data type void type is invalid for sum operator
- Operand data type NULL is invalid for max operator
- Operand data type date is invalid for subtract operator
- What is the data type for Currency in SQL Server?
- What data type do I choose for storing plain text in Microsoft SQL Server 2008?
- Argument data type text is invalid for argument 1 of lower function
- Arithmetic overflow error for data type tinyint, value = -1
- SQL Argument data type int is invalid for argument 1 of charindex function
- Is there an encryption method for a column with a data type of int?
- Entity Framework Core Scaffolding "Could not find type mapping for column with data type 'hierarchyid'. Skipping column"
- Change data type from varchar to nvarchar for a table which has a large amount of data
- Error converting data type nvarchar to numeric.The data for table-valued parameter "@dt" doesn't conform to the table type
- SQL query to find top n values for a column for a specific type of data set
- What data type is best for storing comments in SQL Server?
More questions with similar tag
- Stored procedure doesn't allow null parameters even the parameter represent accept nulls?
- Passing database name like variable
- SSRS: Display image from varbinary column in the database
- Select top 4 with order by, but only if actually required?
- How to do a SQL NOT NULL with a DateTime?
- When do you compact a Sql Server Database?
- get sub string in between mix symbols
- Availability Query Based on Inventory without Dates
- How to execute the Entity Framework Model First DDL File on a SqlServer Compact database?
- Entity Framework Core 3.1 Return value (int) from stored procedure
- Self join and get unique records between a date
- SQL silently converts int to varchar, but then throws an error when it comes across a varchar?
- MSSQL Stored Procedure help comparing Dates
- Must Declare Scalar Variable
- sql query for difference between current row and previous row based on datetime
- SQL CE: Limiting rows returned in the query
- How to use a While Loop in SQL to Create a Variable
- Multiple STRING_AGG on multiple join columns causes bloated aggregation
- How to convert datetime to timestamp in MS SQL stored function
- Why do I get a 11555 error on this SQL Server inline table valued function?
- SQL Server Management Studio 2014 - possible to filter results grid?
- SQL SUM() on one field with other fields on other conditions (the most efficient way)
- T-SQL query - row iteration without cursor
- How to extract data between a date range which has only start and end date values in the table?
- Visual Studio 2022 localdb ((localdb)\MSSQLLocalDB) (ASP.NET Core)
- SQL Server: Return a string in a specific format
- How to fix 'JSON text is not properly formatted. Unexpected character '\' is found at position 1.' error in SQL Server
- How to get multiple values out of an image data type column?
- Converting rows to XML format in SQL Server
- Why is field name Location blue