Execute SQL Task error

  • I'm creating a simple package where i created a Temp table in Execute SQL task and in DFT i'm copying excel source file to this temp table. But the issue is i had to create this temp table before hand so i can map excel file cols to this temp table columns in DFT. When i try to run my package, Execute SQL task fails and shows error that the table is already created. If i delete the temp table and execute the package it throws error

    " Opening a rowset for "##Temp" failed. Check that the object exists in the database."

    how to get this done?

  • Temp tables only persist which the connection that created them is still active.

    Why do you want a temp table?

    Best practice is to create a persisted table in a Staging (or landing) database and I suggest you do that.

    Jez

  • Jez-448386 (8/12/2016)


    Temp tables only persist which the connection that created them is still active.

    Why do you want a temp table?

    Best practice is to create a persisted table in a Staging (or landing) database and I suggest you do that.

    Jez

    I agree.

    Notice that the OP's temp table is a global temp table. It therefore exists until the termination of the last session connected to it, which could belong to a user which did not create it.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

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

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