ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multiple External Data Returns (https://www.excelbanter.com/excel-programming/392040-multiple-external-data-returns.html)

Candyman

Multiple External Data Returns
 
I have an SQL statement that return 3 sets of data to an SQL editor. Each
Statement is separated by a semi-colon. Not all statements have equal titles
or columns. Is there a way to return the three sets in one get external Data
action or do i have to loop through the SQl three time?

My code currently builds the SQL Statement from start to finish and runs
fine for standard returns, but only lists the data return for the first data
set. Is this a limitation with Excel or can I return all 3 data sets in one
shot? In other words do i need to code some sort of looping?

Thanks!



Tim

Multiple External Data Returns
 
How are you running the SQL ?
ADO ?
http://www.freevbcode.com/ShowCode.asp?ID=3058

Tim


"Candyman" wrote in message
...
I have an SQL statement that return 3 sets of data to an SQL editor. Each
Statement is separated by a semi-colon. Not all statements have equal
titles
or columns. Is there a way to return the three sets in one get external
Data
action or do i have to loop through the SQl three time?

My code currently builds the SQL Statement from start to finish and runs
fine for standard returns, but only lists the data return for the first
data
set. Is this a limitation with Excel or can I return all 3 data sets in
one
shot? In other words do i need to code some sort of looping?

Thanks!





Candyman

Multiple External Data Returns
 
OH I see.... what I am fooking for is :
SQL1) count cows, horses and pigs in Ariz
SQL2) count houses, cars in OHIO
SQL#) count people in USA

Return these counts on the same data page, one SQL dataset below the other.
I can get a single (multi record) data set fine. I need to get 3 separate
data sets.

"Tim" wrote:

How are you running the SQL ?
ADO ?
http://www.freevbcode.com/ShowCode.asp?ID=3058

Tim


"Candyman" wrote in message
...
I have an SQL statement that return 3 sets of data to an SQL editor. Each
Statement is separated by a semi-colon. Not all statements have equal
titles
or columns. Is there a way to return the three sets in one get external
Data
action or do i have to loop through the SQl three time?

My code currently builds the SQL Statement from start to finish and runs
fine for standard returns, but only lists the data return for the first
data
set. Is this a limitation with Excel or can I return all 3 data sets in
one
shot? In other words do i need to code some sort of looping?

Thanks!







All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com