I would like to calculate Age base on DOB. I'm getting an error on syntax. Not familiar with the appropriate PL/SQL Syntax for nesting IF/THEN Statements. Any help would be fantastic:
@{Current_Date} = Current Date
"Employee Personal Attributes"."Employee Birth Date" = DOB
WHEN IFNULL("Employee Personal Attributes"."Employee Birth Date", 0)<> 0 THEN
WHEN MONTH("Employee Personal Attributes"."Employee Birth Date") < (Month(@{CURRENT_DATE})) Or (Month("Employee Personal Attributes"."Employee Birth Date") = Month(@{CURRENT_DATE}) And Day("Employee Personal Attributes"."Employee Birth Date") <= Day(@{CURRENT_DATE})) Then
TIMESTAMPDIFF(SQL_TSI_YEAR,"Employee Personal Attributes"."Employee Birth Date", @{CURRENT_DATE})
Else
TIMESTAMPDIFF(SQL_TSI_YEAR,"Employee Personal Attributes"."Employee Birth Date", @{CURRENT_DATE})-1
End
ELSE
0
End
Any Help would be very much appreciated!