Oracle Forums
It is currently Mon Sep 06, 2010 3:12 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: ignoring null values
PostPosted: Tue Jun 22, 2010 4:41 am 
Offline

Joined: Thu May 21, 2009 3:41 am
Posts: 28
hi,

I have a report in report 6 which has static field where values are shown for previous year and for current year. the output of the report will be like this

sl no department prev year cur year
01 revenue 2000 5000
02 costing 500 1000
03 excise 8000 900
and so on....

I have a created a fomula field for each and every department and get the value from a particular table. What i require is if suppose the department revenue does not have any value then that row should not be visible. for eg if revenue has a null value then the report should be like this

sl no department prev year cur year
01 costing 500 1000
02 excise 8000 900

Is it possible . if so pl suggest me the methods

thanks in advance


Top
 Profile  
 
 Post subject: Re: ignoring null values
PostPosted: Tue Jun 22, 2010 12:27 pm 
Offline

Joined: Fri Feb 13, 2009 11:37 am
Posts: 118
Hi Narayan,
What i will do for this query is that rather than creating a formula column i will bring every thing in SQL query.
Example.
select
sl_no, department, prev_year, cur_year from revenue_history
where prev_year is not null and cur_year is not null;


This will only bring rows that have revenue for both the years.

What do you think?

_________________
Regards
Ozy
http://www.oraclevillage.com/


Top
 Profile  
 
 Post subject: Re: ignoring null values
PostPosted: Tue Jun 22, 2010 1:11 pm 
Offline

Joined: Thu May 21, 2009 3:41 am
Posts: 28
thank you.

i will try it out and let you know


Top
 Profile  
 
 Post subject: Re: ignoring null values
PostPosted: Tue Jun 22, 2010 2:27 pm 
Offline

Joined: Fri Feb 13, 2009 11:37 am
Posts: 118
Ok, Cool ;)

_________________
Regards
Ozy
http://www.oraclevillage.com/


Top
 Profile  
 
 Post subject: Re: ignoring null values
PostPosted: Wed Aug 18, 2010 10:07 pm 
Offline

Joined: Sat Apr 18, 2009 2:52 pm
Posts: 3
Location: TANZANIA
Also you can create view with same code it may look like
Create view RESULT as
select
sl_no, department, prev_year, cur_year from revenue_history
where prev_year is not null and cur_year is not null;
Select * from RESULT:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL