| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Manipulating strings
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
![]() |
![]() |