formula column [message #131479] |
Sun, 07 August 2005 02:30 |
sudhir.sukumar
Messages: 52 Registered: August 2005 Location: India
|
Member |
|
|
hi,
using oracle reports (6i).
i have 2 queries based on 2 tables.
i want to create a formula column (i know that) that calculates values from 2 columns, each in different table / query.
how to accomplish that?
thnx, su.
|
|
|
|
Re: formula column [message #131591 is a reply to message #131557] |
Mon, 08 August 2005 08:41 |
sudhir.sukumar
Messages: 52 Registered: August 2005 Location: India
|
Member |
|
|
thx for the reply jawad
but the prob remains as it is.
for both queries users will pass arguments, so the fetch varies.
for instance:
select inventory_item_id, segment1, description, sum(qty) qty
from j.inventoryqty where trunc(creation_date) <=:p_as_on_date
group by inventory_item_id, segment1, description
and
select distinct inventory_item_id, max(nvl(new_cost,0)) new_cost
from mtl_cst_actual_cost_details
where organization_id =12
and trunc(creation_date) <= :p_as_on_date
group by inventory_item_id
i want to do qty * new_cost for every repeating row.
su.
|
|
|
|
|
|
Re: formula column [message #131732 is a reply to message #131710] |
Tue, 09 August 2005 04:07 |
karan.shandilya
Messages: 64 Registered: July 2005 Location: mumbai
|
Member |
|
|
Got it, Jawa.
Thanx.
Jaw, can you tell me tht how we convert salary column in figure.
EXAMPLE-
select salary from table_name;
it gives o/p in the word form.
like if figure is 3,50,054 then it results -
THREE LAKHS FIFITY THOUSAND AND FIFITY FOUR.
in crores,lakhs,thounsand FORMAT..
AND if we do like this
select to_char(to_date('1254','j'),'jsp');
it works BUT not for ,
if we select whole column
select to_char(to_date('salary','j'),'jsp');
it gives error..
I have to use this in report.
Waiting Jawad..
Shaila.
|
|
|
|
Re: formula column [message #131913 is a reply to message #131902] |
Wed, 10 August 2005 01:12 |
sudhir.sukumar
Messages: 52 Registered: August 2005 Location: India
|
Member |
|
|
hi shaila
try this out.
SQL>SELECT TRANSLATE('12,00,000','~' ||
TRANSLATE('12,000','~0123456789','~'),'~') from dual
TRANSLATE
---------
1200000
regards, sudhir.
|
|
|