12 Replies Latest reply on Aug 24, 2016 12:27 PM by Gagan Thapar

    Can I use Tableau joins to replicate the following custom sql query?

    Gagan Thapar

      Can I use Tableau joins to replicate the following custom sql query? Tableau joins have better performance. My major issue is the underlined portion. Rest of joins are normal.

       

       

      SELECT  *

      FROM TABLE_A EIT,

      TABLE_D evt, TABLE_E et,

      ( SELECT MAX(EII.INVOICE_VERSION) AS VERSION, BASE_ITEM_REC_ID

      FROM TABLE_A EII, TABLE_D EIV

      WHERE EII.IV <= EIV.V

      AND EIV.I_REC_ID = EII.I_REC_ID

      AND EIV.INV_NO in ('1000')

      GROUP BY BASE_ITEM_REC_ID ) X

      WHERE X.BASE_ITEM_REC_ID=EIT.BASE_ITEM_REC_ID

      AND X.V=EIT.IV

      and evt.I_REC_ID = eit.I_REC_ID

      and et.I_REC_ID = evt.I_REC_ID

      and et.LV = evt.V;