1 Reply Latest reply: Dec 6, 2012 8:10 AM by Sutirtha Roy RSS

    Using case statement in OWB expression builder

    949890
      Hi All,

      We are using OWB version 10.2.0.1.0. While using the below case statement We are getting the validation message as 'The expression is not properly formed'.

      Case statement used in expression builder:

      case when (INGRP1.CHARGETYPE in ('O','F') or INGRP1.TARIFF_GROUP in ('SMSINT','MMSINT')or ( INGRP1.CALL_TYPE = '002' and INGRP1.TARIFF_GROUP = 'MTV'))
      then
      (select call_zone_reltn_key from call_zone_reltn where
      call_zone_cd=substr(case
                     when substr( INGRP1.B_SUBNO,1,2)='00'
                     then
                     substr( INGRP1.B_SUBNO,3)
                     else substr( INGRP1.B_SUBNO,1)
                     end,1,length(call_zone_cd))and rownum=1)
      else -1
      end

      Kindly help me out in fixing this error or suggest any alternate way to use the above query in OWB expression builder.

      Thanks,
      Kabilan
        • 1. Re: Using case statement in OWB expression builder
          Sutirtha Roy
          946887 wrote:
          Hi All,

          We are using OWB version 10.2.0.1.0. While using the below case statement We are getting the validation message as 'The expression is not properly formed'.
          Did you try to deploy the mapping ? Some time the expression validator gives wrong error messege.
          Try to deploy the mapping and see if you are still getting this issue
          Case statement used in expression builder:

          case when (INGRP1.CHARGETYPE in ('O','F') or INGRP1.TARIFF_GROUP in ('SMSINT','MMSINT')or ( INGRP1.CALL_TYPE = '002' and INGRP1.TARIFF_GROUP = 'MTV'))
          then
          (select call_zone_reltn_key from call_zone_reltn where
          call_zone_cd=substr(case
                         when substr( INGRP1.B_SUBNO,1,2)='00'
                         then
                         substr( INGRP1.B_SUBNO,3)
                         else substr( INGRP1.B_SUBNO,1)
                         end,1,length(call_zone_cd))and rownum=1)
          else -1
          end

          Kindly help me out in fixing this error or suggest any alternate way to use the above query in OWB expression builder.

          Thanks,
          Kabilan