Oracle SQL variables

tjcusick

New Member
Joined
Mar 16, 2011
Messages
9
In my Oracle SQL Script below I have a variable :D1 that in my SQL tester i can set to a string of a date like '02/01/2011'...

Does anyone know how i can translate this into EXCEL to maintain the variable?

I would like to be able to input a date into a cell and then have that cell be referenced by the SQL so this can be automated without having to manipulate the actual SQL script..

Any ideas??
Tom C
~~~~~~~~~~~~~~

Code:
select
Company_name,
'OS Reserves' as type, substr(policy_entity_number,1,3) as polnum,
company_name as Company_code, source_system,transaction_type_cd as code,
(case
when transaction_type_cd = 'M' then sum(-amount)
when transaction_type_cd = 'P' then sum(-amount)
else sum(amount)
end) as amt, 
'VIEW' as src
from
migp.claim_fin_trans
where
1=1
and trunc(transaction_date) <= to_date(:D1, 'MM/DD/YYYY')
group by
rollup(substr(policy_entity_number,1,3),transaction_type_cd ),company_name, source_system
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Also does anyone know why in my Connection Properties the Edit Query button and Parameter button are both grayed out??

I am using OraOLEDB.Oracle provider
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

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