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 |
how i build a report
I developed on form as per my requirement,and register that one in apps custom_top.But the problem is ,if you open the form but not closed,I founded why this is error is comming ,the custom_top is not supported my form . I need any one your help in advicing me...what I do the custom_top supported the forms.
what exactly u write in when_new_form_instance
How can a square be drawn in the layout editor of the report writer?
List the system variables related in Block and Field?
What are the built-in routines is available in forms 4.0 to create and manipulate a parameter list?
What are the two repeating frame always associated with matrix object?
List the Types of Items?
How i call Reports from Forms10g.
in user parameter property we have list of values.can we write select query for binding? for example:: select empno from emp where deptno=:deptnum :deptnum is first parameter it displays distinct dept nos. if i do like this it is giving error:: bind variables are not allowed in the select statement
What use of command line parameter cmd file?
Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size? If yes,how?