adjust truncate sql query to tsql

(Hopefully) fixes #10708 

Please test/review @gig13 @DeepDiver1975