How to normalize DATE using BEFORE INSERT Trigger
We want to normalise date format which is being inserted into a table / updated / selected (WHERE Clause)
For Db2 there is the possibility to link a user exit (assembler), which checks the passed date format for different patterns and converts it to the "internal" format. The Db2 documentation: Date and time routines - Date and time routines - IBM Documentation and When date and time routines are taken - IBM Documentation
Ideally, we would like to see such a user exit in Oracle as well. We tried it with a trigger (and a function),
Scenarios that should work –
INSERT INTO TEST VALUES (1234, 12345, '1994.11.03', '11.06.1993', current_timestamp);