so i have a store procedure where the function is to find out the column which contains the name expired or end (Datetime type), and after that find out the record for that