compile and test sql return values for user insertion