I'm wondering if someone can help me with the following problem for an SQL table.
Suppose I have the following items in the table:
ID_CHILD NAME DATE_OF_BIRTH YEAR_GROUP
Suppose I enter a date of birth for a child in this table. The YEAR_GROUP that the child is in will depend not only on the date of birth of the child but also the current date e.g. the child may be in Year 1, Year 4 or whatever.
How can I get the SQL to automatically update the YEAR_GROUP field so when the table is examined or queried then the correct year group is allocated?
Thanks in advance