Hi pohcb_sonic,
IF EXISTS
checks for the existence of recordset from your table. Looking at your code, you are creating a table if your condition returns falls. I think you should replace your
IF EXISTS (SELECT * FROM VEHICLE_SPEED)
with
IF OBJECT_ID ('VEHICLE_SPEED') IS NOT NULL
This checks if the object exist or not.
Thanks.
[Comment]Please, use proper formatting[/Comment]