Below is a snippet of my Query:
Code:
LEFT JOIN
  (SELECT
     D.NAME2_REC  AS DEGREE1
   , mN.LNAME		  AS D1_LNAME
   , mN.FNAME		  AS D1_FNAME
   , mN.MIDDLE		AS D1_MNAME
   , mN.SUFFIX    AS D1_SUFFIX
   , mN.NICKNAME  AS D1_NICKNAME
   , mN.RACE      AS D1_RACE
   , mN.SEX       AS D1_SEX
   , mN.DOB       AS D1_DOB
   , mN.HGT       AS D1_HGT
   , mN.WGT       AS D1_WGT
   , mN.HAIR      AS D1_HAIR
   , mN.EYES      AS D1_EYES
   , mC.NAME	  AS D1_REL
   , mI.FileType  AS D1_FileType
   , mI.Image     AS D1_Image
    FROM RECORDS3.NLINK D
    LEFT JOIN RECORDS3.MASTCODE mC
    ON D.REL = mC.CODE AND mC.TYPE = 'MNKA'
    LEFT JOIN RECORDS3.MASTNAME mN
     ON mN.RECNUM = D.NAME2_REC
       LEFT JOIN
      (SELECT
        FKDATATABLE	      AS RecNum
      , FKMASTERIMAGE	    AS ImgRec
      , GRAPHIC		        AS Image
      , LOWER(FILE_TYPE)	AS FileType
      FROM RECORDS3.LINKMASTERIMAGE Y
      LEFT JOIN RECORDS3.MASTERIMAGE Z
       ON Y.FKMASTERIMAGE = Z.IMGRECNUM
      WHERE FKTABLENAME  = 'MASTNAME'
      AND MAKE_PRIMARY   = 'Y'
      ) mI ON mN.RECNUM  = mI.RecNum
     WHERE D.NAME1_REC = :Person
    UNION ALL
   SELECT
     D.NAME1_REC  AS DEGREE1
   , mN.LNAME		  AS D1_LNAME
   , mN.FNAME		  AS D1_FNAME
   , mN.MIDDLE		AS D1_MNAME
   , mN.SUFFIX    AS D1_SUFFIX
   , mN.NICKNAME  AS D1_NICKNAME
   , mN.RACE      AS D1_RACE
   , mN.SEX       AS D1_SEX
   , mN.DOB       AS D1_DOB
   , mN.HGT       AS D1_HGT
   , mN.WGT       AS D1_WGT
   , mN.HAIR      AS D1_HAIR
   , mN.EYES      AS D1_EYES
   , mC.NAME      AS D1_REL
   , mI.FileType  AS D1_FileType
   , mI.Image     AS D1_Image
    FROM RECORDS3.NLINK D
    LEFT JOIN RECORDS3.MASTCODE mC
    ON D.REL = mC.CODE AND mC.TYPE = 'MNKA'
    LEFT JOIN RECORDS3.MASTNAME mN
     ON mN.RECNUM = D.NAME1_REC
      LEFT JOIN
      (SELECT
        FKDATATABLE	      AS RecNum
      , FKMASTERIMAGE	    AS ImgRec
      , GRAPHIC		        AS Image
      , LOWER(FILE_TYPE)	AS FileType
      FROM RECORDS3.LINKMASTERIMAGE Y
      LEFT JOIN RECORDS3.MASTERIMAGE Z
       ON Y.FKMASTERIMAGE = Z.IMGRECNUM
      WHERE FKTABLENAME  = 'MASTNAME'
      AND MAKE_PRIMARY   = 'Y'
      ) mI ON mN.RECNUM  = mI.RecNum
     WHERE D.NAME2_REC = :Person
  ) kA1 ON mN.RECNUM           = :Person
This code works, but I feel like there has to be a better way to not have to call everything twice. Is there a better/proper way to do something like the following (which does not work):

Code:
LEFT JOIN
  (SELECT
     mN.LNAME		  AS D1_LNAME
   , mN.FNAME		  AS D1_FNAME
   , mN.MIDDLE		AS D1_MNAME
   , mN.SUFFIX    AS D1_SUFFIX
   , mN.NICKNAME  AS D1_NICKNAME
   , mN.RACE      AS D1_RACE
   , mN.SEX       AS D1_SEX
   , mN.DOB       AS D1_DOB
   , mN.HGT       AS D1_HGT
   , mN.WGT       AS D1_WGT
   , mN.HAIR      AS D1_HAIR
   , mN.EYES      AS D1_EYES
   , mC.NAME	  AS D1_REL
   , mI.FileType  AS D1_FileType
   , mI.Image     AS D1_Image
(
 SELECT     NAME2_REC  AS DEGREE1, REL     FROM RECORDS3.NLINK
   UNION ALL
 SELECT     NAME1_REC  AS DEGREE1, REL     FROM RECORDS3.NLINK
) D
    LEFT JOIN RECORDS3.MASTCODE mC
    ON D.REL = mC.CODE AND mC.TYPE = 'MNKA'
    LEFT JOIN RECORDS3.MASTNAME mN
     ON mN.RECNUM = D.NAME2_REC
       LEFT JOIN
      (SELECT
        FKDATATABLE	      AS RecNum
      , FKMASTERIMAGE	    AS ImgRec
      , GRAPHIC		        AS Image
      , LOWER(FILE_TYPE)	AS FileType
      FROM RECORDS3.LINKMASTERIMAGE Y
      LEFT JOIN RECORDS3.MASTERIMAGE Z
       ON Y.FKMASTERIMAGE = Z.IMGRECNUM
      WHERE FKTABLENAME  = 'MASTNAME'
      AND MAKE_PRIMARY   = 'Y'
      ) mI ON mN.RECNUM  = mI.RecNum
     WHERE D.NAME1_REC = :Person
  ) kA1 ON mN.RECNUM           = :Person
I would think there has to be a better way than what I am currently doing, but every forum/post I have read uses a method similar to mine where they are calling the data twice.