Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

Groupping of Columns and create sub group

Dear all,

I have following  data   i want to create groups like name,address,salary in load  script how I can do this ?

 

GROUPSNAMEADDRESSSALARY
FIELDSNAMECITY STATECOUNTRYREGIONBASICDA

HRA

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
4 Replies
Anonymous
Not applicable

use the Group by function

Table1:

load

Field1,

Field2,

sum(Value1),

sum(Value2)

from ...

Group by Field1, Field2

You Need to define every field in the Group by clause and you Need to use a functtion like sum, max etc. for each value

Anonymous
Not applicable

Hi,

Here is the example :-

LOAD * INLINE [

    BOOKID, TITLE, AUTHOR, PAGES, COUNTRY, QUANTITY

    B001, Harry Poteh! Book 1, JK, 800, UK, 18

    B002, Harry Poteh! Book 2, JK, 900, UK, 49

    B003, Harry Poteh! Book 3, JK, 902, UK, 26

    B004, Harry Poteh! Book 4, JK, 899, UK, 15

    B005, Harry Poteh! Book 5, JK, 901, UK, 11

    B006, Harry Poteh! Book 6, JK, 800, UK, 25

    B007, Harry Poteh! Book 7, JK, 789, UK, 31

    B008, Harry Poteh! Book 8, JK, 678, UK, 50

    B009, Harry Poteh! Book 9, JK, 876, UK, 35

    B010, Harry Poteh! Book 0, JK, 901, UK, 22

    B011, Harry Hudin! Book 1, MA, 844, SG, 49

    B012, Harry Hudin! Book 2, MA, 801, SG, 32

    B013, Harry Hudin! Book 3, MA, 902, SG, 48

    B014, Harry Hudin! Book 4, MA, 816, SG, 31

    B015, Harry Hudin! Book 5, MA, 918, SG, 49

    B016, Harry Hudin! Book 6, MA, 909, SG, 21

    B017, Harry Hudin! Book 7, MA, 821, SG, 24

    B018, Harry Hudin! Book 8, MA, 831, SG, 21

    B019, Harry Hudin! Book 9, MA, 958, SG, 25

    B020, Harry Hudin! Book 0, MA, 838, SG, 42

];

load * INLINE [

  DIMENSION

  BOOKID

  TITLE

  AUTHOR

  PAGES

  COUNTRY

];

Hope this helps.

Thanks,

Bunny

vikasmahajan
Author

NOT CLEAR PLEASE CAN YOU GIVE EXAMPLE ?

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Anonymous
Not applicable

Hi,

Check the attached app .

i think this helps.

Thanks , !

Bunny