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
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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.

ξ
 
Upvote 0

Forum statistics

Threads
1,215,003
Messages
6,122,655
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top