TODO for writing stored procs that work with all RDBMS