SQL corrects

SQL isn't working properly. If I commenting the inserting, it works, and
if I uncomment it then, it will work ok.