Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Is there a replicate type of function in Oracle?
Hi,
We need to write a query like the following that depending upon the
length of value in column we have to replcate 0 that many times, so in
this example for a particular row if the length of column identifier is
2 we have to replcate '0' 6 times:
Select msisdnroot || replicate('0', 8 - length(cast(d.identifier as
varchar2(8)))) from tab d
Replicate is function in SQL Server, is there any equivalent in Oracle?
Thanks
--Harvinder
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 02 2007 - 15:54:58 CST