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: 376
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: 20890
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: Sat Dec 03 13:39:53 CST 2016

Total time taken to generate the page: 0.04666 seconds