Home » SQL & PL/SQL » SQL & PL/SQL » how to get query executed while 1 table and 1 ..... (Oracle 8i)
how to get query executed while 1 table and 1 ..... [message #357214] Tue, 04 November 2008 05:29 Go to next message
asifbhura
Messages: 2
Registered: November 2008
Junior Member
Hi,

I have one view & 1 table

table has field empl_code,emp_name,dept_code etc.

and view has filed like empl_code,overtime etc.

i have dept_code as parameter to be passed in.

now i want that,

i want records from view by passing dept_code if particular empl_code not found in view it should display his name.

like suppose

I passed dept_code='0202070'

this deprtment has 20 employees

now each employee will be checked in view to get overtime & other detail

if some employee dont find any record in view
it should display his empl_code

empl_code-------overtime
1-----------300
2-----------500
3-------------
4-----------400
5-------------
6-----------500

Regards,
ASIF

[Updated on: Tue, 04 November 2008 05:35]

Report message to a moderator

Re: how to get query executed while 1 table and 1 ..... [message #357220 is a reply to message #357214] Tue, 04 November 2008 05:43 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use outer join.

For more, Post a test case: create table and insert statements along with the result you want with these data.

In addition, please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: text too large for formselectopen
Next Topic: URL Escape using UTL_URL?
Goto Forum:
  


Current Time: Sun Dec 04 18:37:12 CST 2016

Total time taken to generate the page: 0.08434 seconds