Re: varchar and number

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: 2000/08/09
Message-ID: <sp4363tin4t34_at_corp.supernews.com>#1/1


"Matt B." <mcb_at_fightspam.sd.znet.com> wrote in message news:sp42lljun4t55_at_corp.supernews.com...
>On WHEN-VALIDATE-ITEM of cents, try this:
>
> :price := nvl(to_number(:dollar),0) + (nvl(to_number(:cents),0)/100);

Actually, now that I think about that, you might have to do it in more than one trigger depending on the navigation in your form, etc. to do the calculation every time the user changes dollar or cents. Put the above code in a local procedure (like CALCULATE_PRICE or something) and call CALCULATE_PRICE from wherever you need to.

-Matt Received on Wed Aug 09 2000 - 00:00:00 CEST

Original text of this message