Outer Join on Values [message #624549] |
Tue, 23 September 2014 08:04 |
|
Mayur Shinde
Messages: 60 Registered: August 2014 Location: Pune, Maharashtra
|
Member |
|
|
I have two tables as 1. Grade_MST 2. Transactions_MST
In first table (Grade_MST) column are:
-----------------------
grade_cd | description |
---------|-------------|
001 | A |
002 | B |
003 | C |
004 | D |
005 | E |
-------------------------
In Second table (Transactions_MST) column are:
--------------------------------------------------------
eff_dt | grade_cd |cr_type |RATE|Auth_by| Auth_dt
---------|-----------------------------------------
01-oct-14| 002 | C |100 | M | sysdate
01-oct-14| 002 | R |200 | M | sysdate
01-dec-14| 003 | C |300 | |
01-dec-14| 003 | R |400 | |
---------------------------------------------------------
When I enter date as : 01-oct-14 then o/p will be as follows:
-----------------------
grade_cd | description |
---------|-------------|
001 | A |
003 | C |
004 | D |
005 | E |
-------------------------
When I enter date as : 01-Dec-14 then o/p will be as follows:
-----------------------
grade_cd | description |
---------|-------------|
001 | A |
002 | B |
003 | C |
004 | D |
005 | E |
-------------------------
Please suggest me....
|
|
|
|
Re: Outer Join on Values [message #624552 is a reply to message #624549] |
Tue, 23 September 2014 08:12 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
As Blackswan says, follow the guidelines. To be more specific at this point:
1. post a test case
2. Use code tags
3. explain the logic of your outputs.
|
|
|
|
|
Re: Outer Join on Values [message #624561 is a reply to message #624559] |
Tue, 23 September 2014 08:33 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
You are asking for assistance.
Others have posted that you need to perform some tasks in order to be able to get that assistance.
You have, so far, failed to perform those tasks.
What do you think is the likely esult of this exchange?
What difficulty arre you having with following the guidelines, maybe we can help explain.
Do you understand what we mean by code tags?
Do you understand what we mean by a test case?
|
|
|
|
|
Re: Outer Join on Values [message #625370 is a reply to message #624722] |
Mon, 06 October 2014 22:49 |
|
Mayur Shinde
Messages: 60 Registered: August 2014 Location: Pune, Maharashtra
|
Member |
|
|
SELECT S.GRADE_CD,S.GRADE_DESC
FROM STEEL_GRADE_MST S
WHERE S.STATUS_FLAG='A'
AND S.GRADE_CD NOT IN(
SELECT DISTINCT T.GRADE_CD
FROM TRANSACTIONS_MST T
WHERE T.AUTH_BY IS NOT NULL
AND T.AUTH_DT IS NOT NULL
AND T.EFF_DT = :BLOCK_PARAM.EFF_DT
)
ORDER BY S.GRADE_CD
|
|
|