Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

SP – Parameter type Numeric(32, 0)

Posted on 2012-09-18
4
Medium Priority
?
262 Views
Last Modified: 2012-10-04
Hi,

I need to use a stored procedure that has a parameter called ‘Option’ of type:

Numeric(32,0)

In what form should I input the data.  I know that valid options are

1
2
3
4

But I can’t understand why this is simply not an int parameter?

Thanks.
0
Comment
Question by:andyw27
4 Comments
 
LVL 72

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 38408496
No clue either. Numeric(32,0) is the same as Decimal(32,0), and represents a number holding exactly 32 decimal digits. Usually you see such when converting from Oracle, but indeed it does not make sense for values that low. A smallint would suffice, or an int. Even a bigint has approximately 15 decimal digits only ...
0
 
LVL 5

Expert Comment

by:sameer_goyal
ID: 38408520
Well, the requirement would be to be able to work with numbers greater than 2147483648. this is the maximum values that an integer can hold. Numeric(32,0) gives you flexibility to actually have an integer far greater than what you could get using an Int
0
 
LVL 18

Expert Comment

by:deighton
ID: 38408589
you should be able to send an integer to the proc without problems.  If the parameter can only be 1,2,3 or 4 then they temporarily wasted a few bytes, but it is unlikely to be noticeable.
0
 
LVL 21

Expert Comment

by:mastoo
ID: 38410120
"In what form should I input the data"

How are you using this?  Typing it into a query window of SSMS?  Dynamic Sql via an ODBC connection?  Parameterized ADO call?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
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.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

572 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