Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedures using decimal

Status
Not open for further replies.

sharonc

Programmer
Jan 16, 2001
189
US
I am calling a stored procedure from VB 6. When I pass 1.5 to the Stored Procedure, I can see it leaving VB as 1.5, but when it displays in the Stored Procedure or on the table it is 2.
How do I define a decimal parameter in my stored procedure so that it remains 1.5?

This is what I have

create procedure sp_LoadNPDES @ph decimal
as
 
Declare the variable as decimal(10,2). The first number is the precision and the second number is the number of digits to right of the decimal point. The default is 0. This is why you see 2 instead of 1.5.


Dwight
 
Thanks for your help. It works great now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top