Re: ISNULL function
Hi Joe,
Depending on the programming language you are using you can do something like:
if valor = 0 OR IsNULL(valor)
Also from your stored procedure can do something like:
DELIMITER $$
DROP PROCEDURE IF EXISTS `sptest`$$
CREATE PROCEDURE `sptest`()
BEGIN
DECLARE presult DECIMAL(10, 3) DEFAULT NULL;
SELECT densidad_r50 INTO presult FROM roos_chamber WHERE depth_cm = 2.1;
SELECT IFNULL(presult, 0) AS valor;
END$$
DELIMITER ;
Edited 2 time(s). Last edit at 03/24/2008 06:41PM by William Chiquito.
Subject
Views
Written By
Posted
320442
February 28, 2008 10:38PM
87900
February 29, 2008 10:15AM
32749
March 23, 2008 12:22PM
18144
March 23, 2008 01:02PM
13024
March 24, 2008 08:10AM
Re: ISNULL function
17692
March 24, 2008 06:05PM
13563
March 25, 2008 12:29PM
16727
March 30, 2009 06:05AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.