Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> varchar2 and number
hi,
I have a form with two fields one for a number and for the decimal. I tried the character '||'to put them together in the same variable then it would be a number(15,2) but of course it doesn't work because i do like this :
Price number(15,2);
Dollar varchar2(15);
cents varchar2(2);
Price=Dollar ||','||cents;
the Dollar and the cents are both in varchar2 because it is from the form so i can't change it.and the price is a variable which contains the value i will insert in a table. In fact, if you didn't understand if the user enter 10 for Dollar and 20 for cents the price would be 10,20.( If you did understood i apologize ).
Is there a functin or anything to do it ?
thanks a lot
Sandy
![]() |
![]() |