Macro to pull data from oracle

Arafat

Board Regular
Joined
May 3, 2011
Messages
61
I Have a workbook which consists of 50 worksheets and i use Edit query window to pull the data from oracle on all these sheets. We run this once in a month. I have to go to every sheet and execute this code which is time consuming and i have to change the date value everytime.Please help me with a macro that can execute this process at once and we should give the date only once.I use OLEDB driver to connect to oracle.

Attached is the Command line code.

Select protocol, patient, Page, (date_indexed) Indexed,(first_entry_date) FirstPass,( second_entry_date) SecondPass,trim( modified_date) modified, trim(CRF_ERROR_COMMENT) Comments from JJA38377_96_crf where date_indexed>='1-May-11' and date_indexed<='1-Jun-11'

Thnaks In advance.:) Please help
 

xenou

MrExcel MVP, Moderator
Joined
Mar 2, 2007
Messages
16,576
Office Version
2013
Platform
Windows
Hi,

Can you link each query to an input cell for the date parameter? Then the input cell can be (in every case) a dependent formula on a single master date. In that case, you should only need to go to the data tab and do a "refresh all".

Just a guess - hope it helps.

ξ
 

Forum statistics

Threads
1,084,882
Messages
5,380,429
Members
401,677
Latest member
BobH

Some videos you may like

This Week's Hot Topics

Top