how to write PRO*C program for SQL queries [message #321544] |
Tue, 20 May 2008 12:48 |
user71408
Messages: 585 Registered: November 2007 Location: NE
|
Senior Member |
|
|
Hi All,
I wrote following SQL query in shell scripting.Now I want to write PRO*C program for the same. Please give me guidelines to write the PRO*C program
select
cp.cost_change
||','|| cp.supplier
||','|| cp.country_id
||','|| cp.item
||','|| cp.value1
||','|| cp.uom1
||','|| cp.value2
||','|| cp.unit_cost
||','|| cp.ord_ind
||','|| cp.default_ind
||','|| cp.dept
||','|| cp.sup_dept_no
from cost_sup cp
where cp.cost_change in (select ch.cost_change
from item_country isc,
cost_sup_detail cpd,
cost_sup_head ch
where ch.active_date =
to_date('sysdate 00:00:00','DD-MON-YYYY HH24:MI:SS')
and ch.cost_change = cpd.cost_change
and cpd.item = isc.item
and cpd.supplier = isc.supplier
and cpd.origin_country_id = isc.origin_country_id
and cpd.unit_cost = isc.unit_cost)
like this I wrote 6 sql queries in the same script.
Thank you.
[Updated on: Tue, 20 May 2008 12:51] Report message to a moderator
|
|
|
|
Re: how to write PRO*C program for SQL queries [message #321554 is a reply to message #321553] |
Tue, 20 May 2008 13:20 |
user71408
Messages: 585 Registered: November 2007 Location: NE
|
Senior Member |
|
|
Michel ,
I have changed the date ,i.e to_char('12-sep-2007 00:00:00').
I don't know how to write the Pro*c program.. So I need your help..
please write a Pro*c program for this then I will follow the same process for remaining queries...
Thank you.
|
|
|
|
|