Revert "Revert "Created SQL Insert statement in reader loop""

This reverts commit b94a7c01bd469dd5c226a1b115fbcdddc1f5debb.