Here you are using string(20) datatype in place of that you can use varchar(20) datatype and also in place of day(date) you can try using day(current_date). Finally end the BEGIN...END block with END statement because BEGIN...END block should end with END statement.