Generate update statement