I'm trying to create a function that should return a date, and occasionally
NULL value. I can't see how to do that. I'm using pl/tcl.
CREATE FUNCTION "start" (text,text) RETURNS date AS ' regsub ^. $1 "$2" job spi_exec "select start_date from jobs
wherejob_code = ''$job''" { if {[info exist start_date]} { return $start_date } }
# return "2/2/2222" HERE I want NULL return "2/2/2222"
'LANGUAGE 'pltcl';
That is to say I'd like to have a function that returns a date but under
some circumstancies it leave it blanck.
TIA
sandro
*:-)
--
Sandro Dentella *:-)
e-mail: sandro@ermit.it sandro.dentella@mi.infn.it