|
|
Archives of the TeradataForum
Message Posted: Thu, 10 Apr 2003 @ 14:28:53 GMT
Subj: | | Stored Proc |
|
From: | | Gorrella, Srini |
Hi All,
Below is the stored proc DDL, when I call this stored proc , the value in Display1 is getting rounded, it should be 2.5 but Im getting it
as 2.00 ,I tried even by casting , can anyone help me out what I need to do here to get the exact value displayed?
REPLACE PROCEDURE testproc
(
OUT Display DECIMAL(4,2),
OUT Display1 DECIMAL(4,2)
)
BEGIN
DECLARE vDisplay DECIMAL(4,2) DEFAULT 0.00;
DECLARE vDisplay1 DECIMAL(4,2) DEFAULT 0.00;
set vDisplay = 10/2 ;
set vDisplay1 = cast(5/2 as decimal(4,2));
SET Display = vDisplay;
SET Display1 = vDisplay1;
END;
TIA,
Srini
| |