Fixed client side SQL to work with inserts