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

Home -> Community -> Usenet -> c.d.o.server -> Re: Manipulating strings

Re: Manipulating strings

From: Lisa Hudd <lisa_at_e-dba.net>
Date: Wed, 03 Nov 1999 15:56:10 +0000
Message-ID: <S1cgOPdxG78FD1fmoQbgkrmyXwtR@4ax.com>

If code is a char or varchar field, you could use SELECT substr(Code,1,3) || '-' || substr(Code,4,2), .....

 Regards,
   Lisa

e-DBA Limited
Leading Database Services Into the Next Millennium www.e-dba.net

On Wed, 03 Nov 1999 15:15:53 GMT, patcyr_at_my-deja.com wrote:

>Hello everyone,
>
>I'm working with visual basic 6.0 and I have a
>DBCombo that is automatically filled with two
>fields of one of my table. But I want my field
>Code, who look like '60010' to be shown like '600-
>10'.
>
>Here's my code:
>
>dim ODyn as oraDynaset
>
>Set ODyn = objDb.CreateDynaset("SELECT Code, Code
>|| ' ' || Name AS Expr1 FROM myTable ORDER BY
>Code", 0&)
>Set ORADC.Recordset = ODyn
>
>Result:
>60010 XXXXXXXXXXXXXXXXXXXXXXX
>What I want:
>600-10 XXXXXXXXXXXXXXXXXXXXXXX
>
>Can anybody help me?
>Thanks a lot!
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Wed Nov 03 1999 - 09:56:10 CST

Original text of this message

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