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
~~~~~~~~~~~~~~
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