1 Reply Latest reply: Jul 6, 2014 12:28 AM by PAUL YEO RSS

    Poor data structure make my expression very complicated.

    PAUL YEO

      Hi All

       

      Below is my database structure which force me create exchange rate for indo with 2 different name. my wish is i just hope to make these 2 var name same.

       

      poor data structure.pngn

       

      Due to the above database structure which is not so smart , which end up make my expression very complicate like below :-

       

       

      if

      (

      match(Currency_P,'SG') and (match (BRAND_P,'IBH')

      ),

       

       

      (AFTER_DISCOUNT*RATE_EU*TRANSPORT_IBH/MU_IBH),

       

       

      if(match(Currency_P,'SG') and (match (BRAND_P,'GE')),

       

       

      (AFTER_DISCOUNT*RATE_US*TRANSPORT_GE/MU_GE),

       

       

       

       

       

       

      if

      (

      match(Currency_P,'INDO') and (match (BRAND_P,'IBH')

      ),

       

       

      (AFTER_DISCOUNT*RATE_EU*RATE_ID_IBH*TRANSPORT_IBH/MU_IBH),

       

       

      if(match(Currency_P,'INDO') and (match (BRAND_P,'GE')),

       

       

      (AFTER_DISCOUNT*RATE_US*RATE_ID_GE*TRANSPORT_GE/MU_GE)

       

       

      )

      )

      )

      )

       

       

       

       

      I like to ask it there any way i can modify my database structure , so that i don't need to create 2 variable :-

       

       

      RATE_ID_GE

      RATE_ID_IBH

       

       

      As these 2 variable are similar , which make user confuse only. at first i try to make the above 2 variable to RATE_ID , it unable to work. hope some one can advise me.

       

       

       

       

      Paul