Archives of the TeradataForum
Message Posted: Thu, 10 Apr 2003 @ 14:28:53 GMT
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;
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|