2007 Feb 12 5:29 AM
Hi all,
How can i concatenate two fields at the time of fething from database .(ie in the select statement ).
for example : select a
b
c
d
e
from xxxx into table t_xx.
thanks & regards,
sandeep
2007 Feb 12 5:37 AM
Hi,
You cannot have a concatenated result while fetching from database.
You have to do the concatenation manually after fetching all your records.
Regards
Subramanian
Hi all,
How can i concatenate two fields at the time of fething from database .(ie in the select statement ).
for example : select a
b
c
d
e
from xxxx into table t_xx.
thanks & regards,
sandeep
2007 Feb 12 5:34 AM
1) fetch data from dbtab into internal tab.
2)make a column for concatenate result field into internal field
3)try.....
loop at itab.
concatenate itab-field1 itab-field2 into itab-field3.
modify itab.
endloop.
2007 Feb 12 5:37 AM
Hi,
You cannot have a concatenated result while fetching from database.
You have to do the concatenation manually after fetching all your records.
Regards
Subramanian
2007 Feb 12 5:38 AM
you may do like this
select a b c into (v_a, v_b, v_c) from dbtab where a in s_a.
concatenate v_a v_b into V_result.
write : /v_result.<or fill the internal table.
endselect.
regards
shiba dutta
2007 Feb 12 6:08 AM
SELECT a b c d e
FROM xxxx
into table t_xx.
LOOP AT t_xx.
CONCATENATE t_xx-a t_xx-b t_xx-c INTO t_xx-d.
MODIFY t_xx.
CLEAR t_xx.
ENDLOOP.U can do like the logic above, u cant do in the select.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |