Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: bin to dec
I don't know about calling the function from DDL, but...
Converting a binary is done by multiplying the value at each position * 2 raised to the power (of the position)
ie
101 = 1*2^2 + 0*2^1 + 1*2^0
1101 = 1*2^3 + 1*2^2 + 0*2^1 + 1*2^0
I didn't completely understand your requirement. Do you have to read a value from the file and convert before you start the load. Or do you get the number during the load (as part of a record).
I haven't used SQL*loader much, but I think it just works as a batch. You can't incrementally process during the load. Hopefully, somebody else can clear this up.
![]() |
![]() |