i have 9 values in a table i.e
-99
-56
-32
41
-2
33
95
-88
55
my question is that i wanna elimenate all -ve values and
wann sum of + values in report
i m using devsuite 10g
its urgent
kindly if anyone knows that answer message me the following
yahoo id
thanx
ALI
smalipaki@yahoo.com
Answers were Sorted based on User's Feedback
Answer / debmalya gupta
select sum(column_name) into l_return from table_name
where column_name >=0
paste this in a formula column and make it the source of
sum amount..
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / girdhari bawane
Hi,
See, Suppouse there is table 'test' in database and having
columns col1 number. this table holding records as
COL1
=====
1
-2
-3
3
-4
4
-5
5
-6
6
2
write query as-
SELECT SUM(col1) FROM test WHERE col1>0;
Result := 21.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ajaz ahmad
TRIGGER:- when button_pressed
declare
cursor c1 is select colum-name from table-name;
sum table-name%rowtype;
begin
sum := 0;
for z in c1 loop
if z.column-name < 0 then
null;
else
sum := NVL( sum + nvl(z.column-name),0);
end if;
end loop;
message('Sum of +ve Values is ='|| sum);
end;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ajaz ahmad kumhar
SELECT SUM(COL_NAME) FROM
( SELECT COL_NAME FROM TABLE_NAME
ORDER BY COL_NAME DESC)
WHERE ROWNUM<=4;
| Is This Answer Correct ? | 0 Yes | 4 No |
State the order in which these triggers are executed ?
i don't want to give the path of .Dat file in .Ctl file dynamically i want to give how
What is the built-in used to get and set lov properties during run-time?
BY SELECT * FROM EMP QUERY ,I GENERATED ONE REPORT.AND SUPPOSE THAT I HAVE 10 PAGES OF OUTPUT. WHAT I WANT IS ,I WANT TOTAL PER EACH PAGE.OK I GOT THAT AND THAT SHOULD BE FORWARDED TO NEXT PAGE AND NEXT PAGES TOTAL SHOULD BE DISPLAYED
What is a Query Record Group?
What are modal windows?
What are the ways to monitor the performance of the report?
I have a frame that contains headings. This frame is enclosed in side a repeating frame. However the headings are not displayed on all pages it is displayed only on the last page. Please let me know why is this happening. print object on = All pages base printing on = enclosing object
How i get the client m/c IP address.
In workflow how can we send a notification to the Supplier giving the Corresponding report Details.
Explain master-detail relationship with some examples.
WHAT IS THE ORACLE FORM TRIGGER WHICH CAN BE FIT IN ALL THREE LEVELS i.e., IN FORM LEVEL, BLOCK LEVEL AND ITEM LEVEL ?