# Is it possible to import data into a temp table?

**URL:** <https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [November 13, 2015, 10:30am UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498 "2015-11-13T10:30:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alloyd\_640](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alloyd\_640](https://forums.toadworld.com/u/alloyd_640)\
**Post date:** [November 13, 2015, 10:30am UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498/1 "2015-11-13T10:30:00Z")

</div>

I frequently use the “Import a data file into a table” wizard for importing excel tables to quick one off analysis. When I do this, I just create a table in my sandbox environment. Is there wa way to instead use this wizard to import into a #temp table instead?

---

<div class="post-metadata">

**Author:** ![Kiki](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kiki](https://forums.toadworld.com/u/Kiki)\
**Post date:** [November 13, 2015, 1:36pm UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498/2 "2015-11-13T13:36:27Z")

</div>

We don’t support import into a temp table right now. I’ve submit an enhancement request QAT-6794 for it.

---

<div class="post-metadata">

**Author:** ![Kiki](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@Kiki](https://forums.toadworld.com/u/Kiki)\
**Post date:** [November 16, 2015, 9:54am UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498/3 "2015-11-16T09:54:12Z")

</div>

Could you please let us know what database platform you are using. Thanks

---

<div class="post-metadata">

**Author:** ![alloyd\_640](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alloyd\_640](https://forums.toadworld.com/u/alloyd_640)\
**Post date:** [November 16, 2015, 10:08am UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498/4 "2015-11-16T10:08:27Z")

</div>

SQL Server 2008 R2.

---

<div class="post-metadata">

**Author:** ![GregDavis11009](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gregdavis11009/32/122_2.png) [@GregDavis11009](https://forums.toadworld.com/u/GregDavis11009)\
**Post date:** [November 18, 2015, 8:37am UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498/5 "2015-11-18T08:37:40Z")

</div>

One thing you may want to try is using the Excel spreadsheet as a data source. You can make a connection to the Excel spreadsheet and it will treat each tab as a table. You can then do a cross connection query to SQL Server. Depending on the size of what you are doing this will either work very well or it might be incredibly slow. I have not found the performance of cross connection queries to be very good. You may find two queries faster. Do a cross connection query to load the spreadsheet data into a temp table followed by your regular query using that temp table. Good luck!

---

<div class="post-metadata">

**Author:** ![alloyd\_640](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alloyd\_640](https://forums.toadworld.com/u/alloyd_640)\
**Post date:** [November 18, 2015, 9:57am UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498/6 "2015-11-18T09:57:16Z")

</div>

Yea, i have toyed with this, but creating a new data connection, and then deleting it when done is more cumbersome than uploading to table and then dropping the table.

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [November 18, 2015, 1:52pm UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498/7 "2015-11-18T13:52:45Z")

</div>

To support creating a temp table would be difficult. The reason is we use multiple connections in Toad. When importing we use a couple of connections and then close them. We currently do not have a way to set the SQL editor to the same connection that created the temp table. For session level temp tables you would need to use the same session.

---

<div class="post-metadata">

**Author:** ![alloyd\_640](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alloyd\_640](https://forums.toadworld.com/u/alloyd_640)\
**Post date:** [November 18, 2015, 1:54pm UTC](https://forums.toadworld.com/t/is-it-possible-to-import-data-into-a-temp-table/34498/8 "2015-11-18T13:54:52Z")

</div>

Gotcha, makes sense. Thanks for investigating.
