Currently I have an SQL query that generates a value for a column called seqid, based on its actual content:
INSERT into invoices(seqid) SELECT concat(year(CURDAT