4 Replies Latest reply on Apr 20, 2017 1:28 PM by Moatasem Shebl

    Mapping Script

    Moatasem Shebl

      Hello Leaders,

       

      I am at EPBCS trying to use that SQL mapping script but it did not work with me what is the issue

       

       

      CASE

       

          WHEN ENTITY = '01_00' THEN UD20 =  'AED'

         

          WHEN ENTITY = '01_00' THEN UD20 =  'USD'

         

          WHEN ENTITY = '01_00' THEN UD20 =  'JOD'

         

          ELSE UD20 = 'No Currency'

       

      END

       

       

      the process return error at validation step when i remove my script from data load mapping it works perfect

       

      Please hep

       

       

      Thank You

        • 1. Re: Mapping Script
          SH_INT

          Which dimension mapping are you putting this script? What are you trying to achieve because you cannot use this statement to set 3 different currency values for the same Entity i.e it wiill always return 'AED' for Entity '01_00'. Also why do you need this script? Why don't you just perform a straight mapping in the UD20 dimension?

          • 2. Re: Mapping Script
            Moatasem Shebl

            I am sorry sir, i want that SQL script

             

             

            CASE

             

                WHEN ENTITY = '01_13' THEN UD20 =  'AED'

               

                WHEN ENTITY = '01_12' THEN UD20 =  'USD'

               

                WHEN ENTITY = '01_11' THEN UD20 =  'JOD'

               

                ELSE UD20 = 'No Currency'

             

            END

             

            the UD20 is the currency dimension and i want it to take different value according to my ENTITY value

             

             

            I faced that error when i execute

             

             

             

             

            2017-04-19 19:39:24,388 FATAL [AIF]: Error in CommMap.updateTDATASEG_T_TDATASEGW

            Traceback (most recent call last):

              File "<string>", line 1762, in updateTDATASEG_T_TDATASEGW

            SQLSyntaxErrorException: java.sql.SQLSyntaxErrorException: ORA-00905: missing keyword

             

             

             

            What is the issue at my script?

            Thank You

            • 3. Re: Mapping Script
              Francisco Amores

              You don't need the assignation after the THEN word

               

              CASE

               

                  WHEN ENTITY = '01_13' THEN UD20 =  'AED'

                

                  WHEN ENTITY = '01_12' THEN UD20 = 'USD'

                

                  WHEN ENTITY = '01_11' THEN UD20 = 'JOD'

                

                  ELSE UD20 = 'No Currency'

               

              END

               

              Cheers

              1 person found this helpful
              • 4. Re: Mapping Script
                Moatasem Shebl

                Thank you sir for your support