Fixed SQL DB tables error

Db Commit should have done after cursor
Table name case error