Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

collect n append

Former Member
0 Likes
731

hi all,

i have a situation like

itab1 | itab2

1 | a

2 | b

3 | c

new | a

wat will be the output for append n wat will be the out put for collect

thanks in adfvance

Santosh

hi all,

i have a situation like

itab1 | itab2

1 | a

2 | b

3 | c

new | a

wat will be the output for append n wat will be the out put for collect

thanks in adfvance

Santosh

5 REPLIES 5
Read only

Former Member
0 Likes
693

Hi,

Append:

itab1 | itab2

1 | a

2 | b

3 | c

new | a

Collect:

itab1 | itab2

1 | a

2 | b

3 | c

new | <----- this record will not come.

collect will add up the values basedon the same keys

Append will just append as if as new row.

Thanks,

Deepak.

Read only

0 Likes
693

thanks for the response but wat exactly is the u\output for both

Read only

Former Member
0 Likes
693

Hi,

If you append it will append all fields respective all the values in the row are same or not.

With append if any

col1 | col 2

A | 1

B | 2

A | 2

With collect statement the output will be :

Col1 | Col 2

A | 3

B | 2.

It will add up the integers 1 and 2 coz, A is common for these two rows.

Thanks,

Sri

Read only

Clemenss
Active Contributor
0 Likes
693

Hi ravulapalli santosh,

did you

- just try what happens?

- press F1 on COLLECT in editor?

Regards,

Clemens

Read only

Former Member
0 Likes
693

In your case with this data.. both append and collect will hhave the same 4

records.

Collect will consolidate the numeric fields based on the unique ness of the remanining fields.. for example say

fld1 fld 2

a 1

b 2

c 3

b 4

with above data..

collect will hhave a 1,b 6 and c 3 where as append will have all the four records.

Thaks

Mahesh