How can we help you today? How can we help you today?

Temporary table support in 3.6 EA

I'm sure I just don't know how it is supposed to work, or how to use it, but I don't see temporary table support working.

Here is an example:

SELECT DISTINCT
tdl_id,
post_date
INTO #test
FROM edic_cga_details;

SELECT * FROM #test tds;

If I put the cursor next to the * and hit TAB to expand the fields nothing happens. If I add a where clause it helps auto complete the alias (tds) but when I hit the "." it doesn't show any suggestions. (Not even a pop-up.)

Is it that 3.6 EA, just doesn't support temporary table creation with the "INTO #<table>" command?
MikeyC
0

Comments

5 comments

  • Bart Read
    Sorry, I should make it clear that this only works for CREATE TABLE not SELECT INTO. I was fairly sternly warned not to support SELECT INTO because it's "evil" due to locking issues in msdb (?)... that and the fact that we didn't have time. Apologies.
    Bart
    Bart Read
    0
  • MikeyC
    Besides it causing a SP to be recompiled every time it is run, do you know why it is considered "evil"?

    Consider this a feature request to add SELECT INTO support sometime in the future. ;)
    MikeyC
    0
  • Bart Read
    Well, "evil" it may be, but I've just added support for it. You should find it working as you'd like in the final 3.6 release.

    Thanks,
    Bart
    Bart Read
    0
  • MikeyC
    Cool, thanks!

    And could you share what ever you have that allows you to create time? ;)

    (It must have been easier than you originally thought if it took less than a half hour to add.)
    MikeyC
    0
  • Bart Read
    Well, that and it's a bit cheeky to go adding features at this stage... but all the building blocks I needed were already there, it was just a case of sticking them together properly. Our testers are going to kill me though.
    Bart Read
    0

Add comment

Please sign in to leave a comment.