Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Is there a replicate type of function in Oracle?

RE: Is there a replicate type of function in Oracle?

From: <oracle-l-bounce_at_freelists.org>
Date: Fri, 2 Feb 2007 17:08:04 -0500
Message-ID: <D6424CD4C8A3C044BBC49877ED51C51804E0278A@ex2003.metratech.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US