I am trying to cut down on the amount of select statements, updates etc in my code so I thought that I would try to create a function for this, however I am puzzled that my efforts are failing at the first hurdle.I am trying to cut down on the amount of select