SQL Server Performance

ARRRG!!

Discussion in 'SQL Server 2005 Reporting Services' started by MichaelB, Feb 21, 2007.

  1. MichaelB Member

    Question. I thought Microsoft was going to fix the "select into temp table in a proc" issue it has had in SQL2005 SP2. I guess not. Any ideas as to if this will ever be fixed or is it a "feature"?


    Michael
    MCDBA

    "The fear of the Lord is the beginning of knowledge,
    but fools despise wisdom and instruction." Proverbs 1:7
  2. jezemine New Member

    what's the issue exactly? is there a kb article about it?

    www.elsasoft.org
  3. FrankKalis Moderator

    I probably missed this thread because it was posted in an RS forum. As jezemine already asked, care to explain your exact issue?

    --
    Frank Kalis
    Moderator
    Microsoft SQL Server MVP
    Webmaster:http://www.insidesql.de
  4. MichaelB Member

    if you have any proc that has a select into temp table then it will not allow you to use that proc (you will get an error - "There is
    an error in the query. Invalid object name '#TempTable'."). Crystal has no problem with this. It is just irritating. You have to use a table variable that sometimes is faster - sometimes not. Once you get it running with the table variable, you can change it back to a select-into for the proc and it wont know the difference. Just a hassle.

    Michael
    MCDBA

    "The fear of the Lord is the beginning of knowledge,
    but fools despise wisdom and instruction." Proverbs 1:7
  5. Adriaan New Member

    Instead of SELECT INTO, did you try CREATE TABLE #tmp and INSERT INTO #tmp SELECT syntax?
  6. FrankKalis Moderator

    The CREATE TABLE...INSERT INTO... combination should be preferred anyway. Causes less trouble with recompilation and locks. Though it's more to type. [<img src='/community/emoticons/emotion-1.gif' alt=':)' />]<br /><br />--<br />Frank Kalis<br />Moderator<br />Microsoft SQL Server MVP<br />Webmaster:<a target="_blank" href=http://www.insidesql.de>http://www.insidesql.de</a>

Share This Page