Question : Stored Procedure is trimming off the decimals...

I have a stored procedure that does a couple select statements and then calculates a value and then returns that value.

The @UnitPrice and @TotalPrice are declared as money.  The value that these are getting are a money type as well in the database.  And a value that is stored is 23.13.  When the value gets returned, I get a whole number back.  When it should be a decimal.  If I break the stored procedure apart and run it as just a sql statement, and I print out the values for @Unit price, it is just a whole number as well.

Why would I not get the decimal value as well?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
GO
/****** Object:  StoredProcedure [dbo].[sp_CalcUPSHundredWeightGround]    Script Date: 07/13/2010 12:55:34 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[sp_CalcUPSHundredWeightGround]
	-- Add the parameters for the stored procedure here
	
	@Zip nvarchar(10),
	@TotalWeight int,
	@ServiceLevel nvarchar(10),
	@PlantID nvarchar(50),
	@Tier tinyint,
	@Zone nvarchar(15),
	@UnitPrice money,
	@TotalPrice money output
	--@Results money OUTPUT


AS
BEGIN
    
       
    select @Zone = sr1 from upshundredweightzipzone 
    where zipstart <= @Zip and zipEnd >= @Zip and PlantID = @PlantID and Tier = @Tier 
    IF @@RowCount > 0
		Begin
		Select @UnitPrice = Price from upshundredweightzoneprice
		where Zone = @Zone and "weight" >= @TotalWeight and PlantID = @PlantID and Tier = @Tier
		Select @TotalPrice = (@TotalWeight / 100) * @UnitPrice
		Return @TotalPrice
		End
	Else
		Begin
		Select @TotalPrice = 0.00
		return @TotalPrice
		End		
END

Answer : Stored Procedure is trimming off the decimals...

Here is what worked.

"C:\Program Files (x86)\Log Parser 2.2\LogParser.exe" "SELECT date, time, c-ip, cs-uri-stem, cs-username, cs(User-Agent), cs-uri-query FROM ex1006*.log TO c:\temp\Output.csv WHERE cs-username LIKE '%jdoe%'"
Random Solutions  
 
programming4us programming4us