Question : sql cast(decimalvalue as varchar(50))/100.00 fail

select cast(999.52 as varchar(50))/100.00
     sql works fine but I'm getting error for when i pass more then 999 value

select cast(1000.52 as varchar(50))/100.00
    Error :Arithmetic overflow error converting numeric to data type numeric.

Answer : sql cast(decimalvalue as varchar(50))/100.00 fail

You should be able to nest it the way I described, but i think nesting a switch inside a switch might get a little hairy...

Maybe something like this?

BP:=
IF {CB_Originator_View.ComType} = 1
THEN
    (IF  {ISB_Commissions_view.alias2} = "ISB"
        THEN (switch Sum ({ISB_Commissions_view.totalloanamount}, {@LO}) < 500000, 30,
                Sum ({ISB_Commissions_view.totalloanamount}, {@LO}) in 500000 to 999999, 35,
                ....and on and so forth
              TRUE, 55)
     ELSE IF {ISB_Commissions_view.alias2} = "FNMA"
        THEN (switch Sum ({ISB_Commissions_view.totalloanamount}, {@LO}) < 500000, 30,
                Sum ({ISB_Commissions_view.totalloanamount}, {@LO}) in 500000 to 999999, 35,
                ....and on and so forth
              TRUE, 55)
      )

ELSE IF {CB_Originator_View.ComType} = 2
THEN
    (IF  {ISB_Commissions_view.alias2} = "ISB"
        THEN (switch Sum ({ISB_Commissions_view.totalloanamount}, {@LO}) < 500000, 30,
                Sum ({ISB_Commissions_view.totalloanamount}, {@LO}) in 500000 to 999999, 35,
                ....and on and so forth
              TRUE, 55)
     ELSE IF {ISB_Commissions_view.alias2} = "FNMA"
        THEN (switch Sum ({ISB_Commissions_view.totalloanamount}, {@LO}) < 500000, 30,
                Sum ({ISB_Commissions_view.totalloanamount}, {@LO}) in 500000 to 999999, 35,
                ....and on and so forth
              TRUE, 55)
      )

ELSE 0
Random Solutions  
 
programming4us programming4us