Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2895

Re: Determine if valid date via SQL

$
0
0

I was also needed to check and validate some input values for my SQL procedure.date

I was end up this post,,,

 

I did bit different way (Based on Herique-san's post)  and would like to share for the future uses.

My version is just create a date type variable and catch the exception when none date value movement. (This will check like 20150229, 20111234 etc)

 

Best Regard Beri

--Example---

 

Declare lv_date DATE;

Declare EXIT handler FOR sql_error_code 303

Begin

-- Your error process

End;

lv_date = :iv_key2;    --< If iv_key2 is not date, exception 303 will occurs then cacth and process it,,


Viewing all articles
Browse latest Browse all 2895

Trending Articles