troubleshooting Question

Inner join inside a left join in crystal report wizard

Avatar of louisgh
louisgh asked on
Crystal Reports
2 Comments2 Solutions558 ViewsLast Modified:
hi, I wanted to know how do I insert this part of sql in a wizard report :

--JOIN FOR CO ROUTE
LEFT JOIN MVXCDTA.MWOHED AS MHEDR

INNER JOIN MVXCDTA.MITMAS AS MASTR ON
MASTR.MMCONO = MHEDR.VHCONO AND
MASTR.MMITNO = MHEDR.VHPRNO

LEFT JOIN MVXCDTA.MWOOPE AS OPE2 ON
OPE2.VOCONO = MHEDR.VHCONO AND
OPE2.VOFACI = MHEDR.VHFACI AND
OPE2.VOPRNO = MHEDR.VHPRNO AND
OPE2.VOMFNO = MHEDR.VHMFNO AND
OPE2.VOOPNO = 20
ON
MHEDR.VHCONO = ORD.OACONO AND
MHEDR.VHMFNO = (SELECT MAX(MHEDR2.VHMFNO)
FROM MVXCDTA.MWOHED AS MHEDR2
WHERE MHEDR2.VHCONO = ORD.OACONO AND
MHEDR2.VHRORC = 0 AND
MHEDR2.VHRORN = ORD.OAORNO AND
MHEDR2.VHPRNO LIKE '99%')

I thought about building a command near the report files, but I have an sql Expresion!!!

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros