Querying An Oracle Database In A Function

  • Hi All,

    I am trying to create an Excel function that can query an oracle database, using the data in a cell in Excel. For example:

    I have an oracle database with a table CustDetails containing all customer names and their addresses.

    I then have an excel spreadsheet containing various customer names in column B. I want to be able to enter in column C "=GetPostcode("B2"), and then this will pull back the information from the Oracle database using SQL such as

    Select PostCode From CustDetails Where CustomerName = [the data fed to function]

    Is anyone able to point me in the direction of some code to help with this? My general VBA skills are pretty good, but i just have no knowledge of ADO, and not much SQL.

    Any help would be much appreciated.



  • Re: Querying An Oracle Database In A Function


    example of an ado-connection to oracle:

    Hope this helps.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!