Hi, I have a table with the following fields,
date of birth
I want to write a trigger to auto fill the field NIN Base o the sex and date of birth. the NIN format is as follows
where DDMMYY is date of birth
RR is region and which will be hard coded
SSS is a randomly generated number where the even are male and odd female. The number should be unique. No two employees can have the same number.
How can achieve this?