| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Is there a replicate type of function in Oracle?
I got it, Thanks a lot.
-----Original Message-----
From: Harvinder Singh
Sent: Friday, February 02, 2007 4:55 PM
To: oracle-l
Subject: 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 - 16:08:04 CST
![]() |
![]() |