No doubt you can craft your SQL or the database schema so that no duplicates get into MSSQL.
I'd probably use MQTT to pass the SQL statement from the Pi to the server. It's not trivial to guarantee delivery over an unreliable network but there are posts here describing an approach.
Use the same mechanism to pass back a list of inserted records and set a "transferred" flag in SQLite for reference in 5 minutes time.