• select top 5 machine.name, machine.model, machine.scantime

    'INSERT INTO [SMS_000].[dbo].[BMCMachines] ([ComputerName],[MachineModel],[stime]) VALUES (' + '''' + machine.name + ''',' + '''' + machine.model + ''',' + convert(datetime,machine.scantime,112) + ''')' from machine

    This query is syntactically incorrect. Try putting a comma after machine.scantime. What is it that you are really trying to do? How about this?

    INSERT INTO [SMS_000].[dbo].[BMCMachines]

    ([ComputerName],[MachineModel],[stime])

    SELECT top 5

    machine.name,

    machine.model,

    machine.scantime

    FROM machine

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden