Home » Developer & Programmer » Reports & Discoverer » If empno is null then show all record (10g,Developer 6I,Window XP)
If empno is null then show all record [message #383115] Tue, 27 January 2009 05:24 Go to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Hellow

I have a question that i make a report which contain all emp record like

Select * from emp where empno=:Empno

now i want

when empno will null its show me all record of emp table


Hope all of you understand


Thanks


Shahzaib ismail
Re: If empno is null then show all record [message #383123 is a reply to message #383115] Tue, 27 January 2009 05:55 Go to previous messageGo to next message
vivekbhatt23
Messages: 5
Registered: January 2009
Location: delhi
Junior Member

u can try
select * from emp where empno=:Empno or :Empno is null

it will work.
Re: If empno is null then show all record [message #383124 is a reply to message #383115] Tue, 27 January 2009 05:57 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
select * from emp e
where e.empno = nvl(:empno, e.empno)
Previous Topic: HELP: Discoverer Error
Next Topic: REP-1212 error message
Goto Forum:
  


Current Time: Fri Apr 26 08:01:32 CDT 2024