08-18-2007 4:09 PM
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
08-18-2007 4:32 PM
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.
08-18-2007 5:26 PM
08-18-2007 5:28 PM
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
08-18-2007 8:55 PM
Hi ravulapalli santosh,
did you
- just try what happens?
- press F1 on COLLECT in editor?
Regards,
Clemens
08-19-2007 6:19 AM
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