I want to lengthen several event numbers by adding a 0 after the first two digits. The first two digits represent the year. Ex. I want to change 121023 to 1201023. So I want to change ALL event numbers (Varchar) that start with 12 to start with 120 by adding the 0 in to lengthen ALL of the event numbers by one.
This is what I have so far:
UPDATE EVENT
SET EVNT_URI = '***what do I put here?***'
WHERE EVNT_URI IN(SELECT EVNT_URI FROM EVENT WHERE EVNT_URI LIKE '12%')
The reason I am doing this is that the 12 represents the year and the event numbers are getting close to 130000. All of the event numbers are 6 digits and I want to change them to 7 digits by adding a zero after the first to digits which represent the year.
Although if these aren’t numbers, but simply a string formed of numerical characters, one might argue they shouldn’t be stored as int at all