|
-
Okay, the literal translation of the query would be:
SELECT
---*
FROM
---HC0MSTR---A,
---(
---SELECT
------RL0TO#,
------RL0FR#
---FROM
------RL0RELN
---WHERE
------RL0RLTYP IN---('BILLNG','SERVCE')---AND
------RL0TOTYP IN---('PHY','MBX')
---) ---------B,
---LC0MSTR---C
WHERE
---B.RL0FR#------=---A.HC0HC#---AND
---C.LC0LC#---(+)=---B.RL0TO#
However, I don't see the resoning behind making the query on B a sub-query. Therefore, the following query would be cleaner and give you the same result:
SELECT
---*
FROM
---HC0MSTR---A,
---RL0RELN---B,
---LC0MSTR---C
WHERE
---B.RL0RLTYP---IN---('BILLNG','SERVCE')---AND
---B.RL0TOTYP---IN---('PHY','MBX')---------AND
---A.HC0HC#------=---B.RL0FR#---------------AND
---C.LC0LC#---(+)=---B.RL0TO#
Of course, I'm assuming that you would replace the * with an actual list of columns, because the two statements *do* return different columns.
Hope this helps,
- Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|