2008 Feb 27 11:10 AM
Hi,
I am having a four char fields of length 20..
char1 = 'hi'
char2 = 'my'
char3 = 'name'
char4 = 'is,
I want to concatenate all the fields in a string field..
but whn i concatenate it is coming continously like
himynameis
but i need a space in b/w all
hi my name is..
Can anyone help me with sample code
2008 Feb 27 11:12 AM
use .. separated by space
concatenate char1 char2 char3 char4 into char5 separated by space.
use .. separated by space
concatenate char1 char2 char3 char4 into char5 separated by space.
2008 Feb 27 11:12 AM
use .. separated by space
concatenate char1 char2 char3 char4 into char5 separated by space.
2008 Feb 27 11:13 AM
Hi,
YOu can do like this :
concatenate char1 ' ' char2 ' ' char3 ' ' char4 ' ' into char.
also u can use the following:
CONCATENATE c1 c2 c3 c4 INTO c5 SEPARATED BY sep.
Regards,
Himanshu
Edited by: Himanshu Verma on Feb 27, 2008 4:44 PM
2008 Feb 27 11:15 AM
2008 Feb 27 11:15 AM
Hi,
CONCATENATE
Concatenates (chains) several strings to a string.
Syntax
CONCATENATE <c1>... <cn> INTO <c> [ SEPARATED BY <s> ]
[IN BYTE MODE|IN CHARACTER MODE].
This statement concatenates the strings <c1> to <cn> and assigns the result to <c>. The addition SEPARATED BY <s> allows you to specify a character field <s> which is placed in its defined length between the individual fields. In Unicode programs, you must specify whether the statement is a character or byte operation, using the IN BYTE MODE or IN CHARACTER MODE (default) additions.
Regards,
Priya.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |