Quantcast
Channel: SCN: Message List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 8968

Getting error creating function

$
0
0

Hello Experts,

 

I am trying to create the below function and getting error, I am creating this function to convert decimal to date

 

CREATE FUNCTION SDW_STAGE.ICOMS_DATE_CONVERSION
(  p_icoms_date  int)
RETURNS date LANGUAGE SQLSCRIPT AS

BEGIN
    IF p_icoms_date IS NULL THEN
        RETURN NULL;
    ELSE IF p_icoms_date IN (0,999999) THEN
        RETURN NULL;
    ELSE
        RETURN TO_DATE (p_icoms_date + 19000000, 'YYYY-MM-DD');
       END IF;      
       
END;

Please let me know what could be the issue.

 

Thanks,

Nishith


Viewing all articles
Browse latest Browse all 8968

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>