Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default Update Query and Local Tables in Excel

I have a group of Access queries that I run in sequence across an ODBC
connection against an Oracle database. The first two are update queries that
create local Access tables that are then queried by the remaining queries in
the group. In other words, the first two queries query Oracle and create two
local tables. Subsequent queries query the two local tables to further refine
the result set.

I am trying to migrate this whole operation to Excel since this is
ultimately where the result set is used. I can query Oracle through ODBC from
Excel. No problem. But now I'm stuck. I somehow need to create a "local
table" of the result set in Excel that I can later query. Or is there a way
for me to query the resulting recordset itself? I've read through many of the
postings on the site and consulted the books I have and the help files, but I
haven't been able to pull all of the pieces together.

Can anyone point me in the right direction?

Thanks in advance!!!

--
Kevin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Update Query and Local Tables in Excel

There are methods for treating an Excel sheet as a Table which can be
queried through ODBC Jet.
This is probably the preferred method by some.


Another way is to configure the querytable to fill adjacent formulas.
Use formulas to modify your results. Some of the formulas might contain 1 or
0 depending on whether you want those results included in the next table.

The next table is simply a pivot table. based on your queried results.
Use Page filters to exclude the formulas returning 0.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Kevin" wrote in message
...
I have a group of Access queries that I run in sequence across an ODBC
connection against an Oracle database. The first two are update queries
that
create local Access tables that are then queried by the remaining queries
in
the group. In other words, the first two queries query Oracle and create
two
local tables. Subsequent queries query the two local tables to further
refine
the result set.

I am trying to migrate this whole operation to Excel since this is
ultimately where the result set is used. I can query Oracle through ODBC
from
Excel. No problem. But now I'm stuck. I somehow need to create a "local
table" of the result set in Excel that I can later query. Or is there a
way
for me to query the resulting recordset itself? I've read through many of
the
postings on the site and consulted the books I have and the help files,
but I
haven't been able to pull all of the pieces together.

Can anyone point me in the right direction?

Thanks in advance!!!

--
Kevin



  #3   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Update Query and Local Tables in Excel

I think what you are looking for is creating a table in excel, this is done
by naming a specified range. eg...

ActiveWorkbook.Names.Add Name:="destin2", RefersToR1C1:="=SHEET1! _
R1C147:R10:C200"

this in excel workbooks as a "table" for queries
ben
"Kevin" wrote:

I have a group of Access queries that I run in sequence across an ODBC
connection against an Oracle database. The first two are update queries that
create local Access tables that are then queried by the remaining queries in
the group. In other words, the first two queries query Oracle and create two
local tables. Subsequent queries query the two local tables to further refine
the result set.

I am trying to migrate this whole operation to Excel since this is
ultimately where the result set is used. I can query Oracle through ODBC from
Excel. No problem. But now I'm stuck. I somehow need to create a "local
table" of the result set in Excel that I can later query. Or is there a way
for me to query the resulting recordset itself? I've read through many of the
postings on the site and consulted the books I have and the help files, but I
haven't been able to pull all of the pieces together.

Can anyone point me in the right direction?

Thanks in advance!!!

--
Kevin

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default Update Query and Local Tables in Excel

Ben:

So if I'm understanding properly, I would be able to name the range and then
run a query such as:

SELECT * INTO destin2 FROM MyOracleTableODBC

Is that correct?

Can I subsequently refer to this named range in a query, such as:

SQL_Text = "SELECT * FROM destin2 WHERE Something = SomethingElse"
MyRecordset.Open SQL_Text, Cnn, adOpenStatic

Kevin


"ben" wrote:

I think what you are looking for is creating a table in excel, this is done
by naming a specified range. eg...

ActiveWorkbook.Names.Add Name:="destin2", RefersToR1C1:="=SHEET1! _
R1C147:R10:C200"

this in excel workbooks as a "table" for queries
ben
"Kevin" wrote:

I have a group of Access queries that I run in sequence across an ODBC
connection against an Oracle database. The first two are update queries that
create local Access tables that are then queried by the remaining queries in
the group. In other words, the first two queries query Oracle and create two
local tables. Subsequent queries query the two local tables to further refine
the result set.

I am trying to migrate this whole operation to Excel since this is
ultimately where the result set is used. I can query Oracle through ODBC from
Excel. No problem. But now I'm stuck. I somehow need to create a "local
table" of the result set in Excel that I can later query. Or is there a way
for me to query the resulting recordset itself? I've read through many of the
postings on the site and consulted the books I have and the help files, but I
haven't been able to pull all of the pieces together.

Can anyone point me in the right direction?

Thanks in advance!!!

--
Kevin

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Local OLAP cubes in Excel/MS Query IgorM[_2_] New Users to Excel 4 December 20th 13 08:12 AM
Excel 2000 on WTS 2003 and local Excel links don't update Karl_uk Excel Discussion (Misc queries) 0 October 24th 07 11:39 AM
Stoping users from saving tables to their local machines... Philippe Roy Excel Discussion (Misc queries) 1 August 17th 05 06:47 PM
Two Excel tables in MS Query Jamshed Excel Discussion (Misc queries) 0 June 24th 05 12:33 PM
Reference styles and local/non-local formulae - international problems. Alan Howells[_2_] Excel Programming 2 February 24th 04 09:52 AM


All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"