Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am running SQL queries from excel and populate the sheets. I have a problem when i am running the queries which create temp tables. After i create temp table and run another query on that temp table (#temp1) it is giving an error. Can any one help on this |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In my experience you cannot run a new query in the same range as a previous
query. Only a refresh is allowed of the previous query. Either delete the range of the previous query or use a different, non-overlapping range. Mike F "Mahesh" wrote in message ... Hi, I am running SQL queries from excel and populate the sheets. I have a problem when i am running the queries which create temp tables. After i create temp table and run another query on that temp table (#temp1) it is giving an error. Can any one help on this |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you create the temporary table within the same SQL session/connection?
The temporary table is normally only session specific. You could try creating the temp table as a global temp table - call it ##name rather than #name -- www.alignment-systems.com "Mike Fogleman" wrote: In my experience you cannot run a new query in the same range as a previous query. Only a refresh is allowed of the previous query. Either delete the range of the previous query or use a different, non-overlapping range. Mike F "Mahesh" wrote in message ... Hi, I am running SQL queries from excel and populate the sheets. I have a problem when i am running the queries which create temp tables. After i create temp table and run another query on that temp table (#temp1) it is giving an error. Can any one help on this |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John,
I want to run the queries in the same session. Problem here is i am not running the queries in the SQL Analyzer. i am running it through excel using some macros. E.g: I place a query in one cell and the macro will run the query to populate the results in new sheet. so when i give select * from customer it gives the data output but when i give select * into #temp1 from customer and then run another query select * from #temp1 it gives an error saying invalid object #temp1. Can you please help how to get rid of this error and populate the data from #temp1 Thanks, Mahesh "John.Greenan" wrote: Do you create the temporary table within the same SQL session/connection? The temporary table is normally only session specific. You could try creating the temp table as a global temp table - call it ##name rather than #name -- www.alignment-systems.com "Mike Fogleman" wrote: In my experience you cannot run a new query in the same range as a previous query. Only a refresh is allowed of the previous query. Either delete the range of the previous query or use a different, non-overlapping range. Mike F "Mahesh" wrote in message ... Hi, I am running SQL queries from excel and populate the sheets. I have a problem when i am running the queries which create temp tables. After i create temp table and run another query on that temp table (#temp1) it is giving an error. Can any one help on this |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok, so try calling the table ##table....
Where you run the code from is not relevant - in vb or query analyser. The session is still there. -- www.alignment-systems.com "Mahesh" wrote: Hi John, I want to run the queries in the same session. Problem here is i am not running the queries in the SQL Analyzer. i am running it through excel using some macros. E.g: I place a query in one cell and the macro will run the query to populate the results in new sheet. so when i give select * from customer it gives the data output but when i give select * into #temp1 from customer and then run another query select * from #temp1 it gives an error saying invalid object #temp1. Can you please help how to get rid of this error and populate the data from #temp1 Thanks, Mahesh "John.Greenan" wrote: Do you create the temporary table within the same SQL session/connection? The temporary table is normally only session specific. You could try creating the temp table as a global temp table - call it ##name rather than #name -- www.alignment-systems.com "Mike Fogleman" wrote: In my experience you cannot run a new query in the same range as a previous query. Only a refresh is allowed of the previous query. Either delete the range of the previous query or use a different, non-overlapping range. Mike F "Mahesh" wrote in message ... Hi, I am running SQL queries from excel and populate the sheets. I have a problem when i am running the queries which create temp tables. After i create temp table and run another query on that temp table (#temp1) it is giving an error. Can any one help on this |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel queries | Excel Discussion (Misc queries) | |||
queries in excel | Excel Discussion (Misc queries) | |||
Queries / Excel | Excel Programming | |||
Web queries and Excel | Excel Programming | |||
Excel Queries. | Excel Programming |