Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gagani
Posting Yak Master
112 Posts |
Posted - 2014-10-29 : 11:14:18
|
create PROCEDURE sampleprocdure1 @zx decimal, @zurg decimalASBEGIN declare @Return decimalSet @Return = @zx + @zurg print @Return;return @ReturnENDGOEXEC [dbo].[sampleprocdure1] @zx = 7.2196434, @zurg= 0.30;I am getting the output at 7.How to get the output as 7.5196434?what changes I need to do to the stored procedure? |
|
AASC
Starting Member
24 Posts |
Posted - 2014-10-29 : 11:44:28
|
@Gagani your are missing Precision and Scaling parameter to Decimal data type of SQl Server.http://msdn.microsoft.com/en-us/library/ms187746.aspxalter PROCEDURE sampleprocdure1 @zx decimal(15,7),@zurg decimal(15,7)ASBEGINdeclare @Return decimal(15,7)Set @Return = @zx + @zurg print @Return;return @ReturnENDGO[url][/url] |
|
|
|
|
|