sql cursor select data types fixed