Accessing oracle database through excel cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
The problem I am trying to solve is acessing an oracle database and excecute
a query through an excel cell.

The query would be as follows: select count(XXX_ID) from XXX.YYY_YYY where
AAA in (Excel cell B2) and CCC in (Excel cell G2);

Is is possible to execute such a query, and capture variable info from
another excel cell?

Thanks for any help!
 
You can do Data > GetExternalData > CreateNewQuery > and follow the menus.
You must however, have specific access and Rights to the database or it won't
work.

hth
Vaya con Dios,
Chuck, CABGx3
 
Unfortunately, I can't seem to figure out how to call on values from Excel
cells to insert into the queries written in the Query Wizard.
 
It's not real friendly in that way........you'll have to get into some pretty
intense VBA programming if you want to do much of that..........you might try
going through the steps manually one-time with the Macro Recorder turned on
and see what you get....sometimes it's clear enough to be editable.


hth
Vaya con Dios,
Chuck, CABGx3
 
I'm somewhat comfortable writing the VBA, I just dont know how to use it to
connect to my oracle db
 
Well then, just turn on the Macro Recorder.........Tools > Macros >
RecordNewMacro........... and go through the MSQuery steps of Data >
GetExternalData > CreateNewQuery > and then follow the menus to select your
Oracle Database, etc etc..........if you don't see the selection of Oracle,
then you do not have access to it and need to get the rights/password/etc
from your MIS folks...............

After you get there, turn off the recorder and go to the VBE to see what you
got.........sometimes you can directly replace a fixed value with something
like Range("b3").Value .........................

hth
Vaya con Dios,
Chuck, CABGx3
 
Thanks for the advice, I'll give it a shot

CLR said:
Well then, just turn on the Macro Recorder.........Tools > Macros >
RecordNewMacro........... and go through the MSQuery steps of Data >
GetExternalData > CreateNewQuery > and then follow the menus to select your
Oracle Database, etc etc..........if you don't see the selection of Oracle,
then you do not have access to it and need to get the rights/password/etc
from your MIS folks...............

After you get there, turn off the recorder and go to the VBE to see what you
got.........sometimes you can directly replace a fixed value with something
like Range("b3").Value .........................

hth
Vaya con Dios,
Chuck, CABGx3
 
Okey doke.........good luck, and post back if you still have difficulties
with it.........

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top