Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > Re: Space betwe...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 8844 of 9520
Post > Topic >>

Re: Space between characters

by "lenygold via DBMonster.com" <u41482@[EMAIL PROTECTED] > May 1, 2008 at 02:00 PM

Thank you. Translate is working 
Dave Hughes wrote:
>> I HAVE A STRING:   ABCDEFG 
>> 
>[quoted text clipped - 4 lines]
>> 
>> Thank's in advance Leny G.
>
>The TRANSLATE function [1] can be handy for this:
>
>VALUES TRANSLATE('A B C D E F G H', SOMESTRING, 'ABCDEFGH')
>
>For example:
>
>SELECT
>  TRANSLATE('A B C D E F G H', S, 'ABCDEFGH')
>FROM (
>  VALUES
>    ('ABCD'),
>    ('1234'),
>    ('Testing')
>  ) AS T(S)
>
>Outputs:
>
>1
>---------------
>A B C D
>1 2 3 4
>T e s t i n g
>
>  3 record(s) selected.
>
>Just expand the first and third parameters with more characters if
>extra length is required.
>
>[1]
>http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.l
>uw.sql.ref.doc/doc/r0000862.html
>
>Cheers,
>
>Dave.

-- 
Message posted via http://www.dbmonster.com
 




 4 Posts in Topic:
Space between characters
"lenygold via DBMons  2008-05-01 11:46:47 
Re: Space between characters
"Dan van Ginhoven&qu  2008-05-01 13:08:16 
Re: Space between characters
"Dave Hughes" &  2008-05-01 08:23:26 
Re: Space between characters
"lenygold via DBMons  2008-05-01 14:00:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 21:24:52 CST 2008.