5 Replies Latest reply: Jan 23, 2017 4:35 AM by Girirajsinh Vaghela RSS

    Synthetic Key issue

    Abu Sayeed Baseer

      How to resolve the synthetic key issue for the below shown model viewer. Need both Columns SL_DATE and VNDR_GROUP.

      Untitled.jpg

        • Re: Synthetic Key issue
          Girirajsinh Vaghela

          You may rename VNDR_GROUP of SALES_RETURN_HDR to SRH_VNDR_GROUP

          update

          Also you may need to create extra composite key SL_DATE+VNDR_GROUP, depending on relation between SALS_HDR and SALES_RETURN_HDR

            • Re: Synthetic Key issue
              Abu Sayeed Baseer

              Dear Giri

               

              My Requirement is to link the "VNDR_DTL.VNDR_GROUP "WITH VNDR_GROUP of both SALES_HDR and SALES_RETURN_HDR. But to get the Exact Data as per Date i have to link the DATE as well with both the HDR tables. when i am doing this i am getting a synthetic key. How to resolve this issue? as per your reply i am not getting the exact data (I TRIED ALREADY). is there any solution that we can solve this using Qualify and Unqualify.

               

               

               

              SL_DATE : is

               

               

              SALE_DATE as SL_DATE

              SALE_RETURN_DATE as SL_DATE

              in master Calendar date is configured as  SL_DATE


              Then How can a extra composite key will create ?

                • Re: Synthetic Key issue
                  Girirajsinh Vaghela

                  Ok

                  will there be same vendor value for sales header and sales return entry ? if so you don't need to connect to both ,right ? just connect to sales_hdr

                  if venor can be different for both hdr and return, then

                  left join(sale_hdr) to vendr_dtl

                  and left join(sale_retun_hdr) to vendr_dtl

                  Thus there wont be vendr_dtl table and yes you will need to qualify both tables except for SL_DATE key

              • Re: Synthetic Key issue
                Daniel Ansell

                You could concatenate the Sale and Sale Return tables together creating a singular fact table.

                This would remove the synthetic key.