DTS- Incorrect syntax near Insert

  • This is kind of weird. There is Execute SQL Task in the first step inside the package which creates a temp table and loads data into it. If I execute this SQL statements in query analyzer, it executes fine. But if I execute it in the package, it says 'Incorrect syntax near Insert'….

    Already spent several hours to spot the issue. Can anybody give me insight on this?

    Thanks!

  • Please post the SQL code from the Execute SQL task. The CREATE and INSERT are in a single task, correct?

    If you're using the table in another task, you might have better luck if you use a global temporary table or a permanent table.

    Greg

  • INSERT is a reserved word...I think you have a column named INSERT

    change the column name or wrap it in brackets or dbl quotes:

    [INSERT]

    or "INSERT"

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply