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
Messages: 2
Registered: November 2008
Junior Member

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



[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: 65137
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).

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

Current Time: Thu Aug 17 08:47:39 CDT 2017

Total time taken to generate the page: 0.16968 seconds