4 Replies Latest reply: Aug 25, 2014 1:28 AM by Vivek Singh

I have following data in a table

Phone_No                           Calls

 0112-853654 1 0773-412505 1 0773-675076 1 0779-620776 1 0779-620776 1 0779-620776 1 0775-510012 1 0773-758330 1 0773-758330 1 0774-030896 1 0777-442624 1 0776-127635 1 0777-896168 1 0777-345776 1 060-2630504 1 060-2630504 1 060-2630504 1 0714-222012 1 0716-839973 1 0773-405351 1 0112-796896 1 0414-397802 1 0777-447446 1 0773-559133 1 0716-822250 1

I want to load only the data where no of calls >=2 from a single line(highlighted in red). Pls help me to write the script

Try the following script:

X:

LOAD RowNo() as No, * Inline [

Phone_No,Calls

0112-853654,1

0773-412505,1

0773-675076,1

0779-620776,1

0779-620776,1

0779-620776,1

0775-510012,1

0773-758330,1

0773-758330,1

0774-030896,1

0777-442624,1

0776-127635,1

0777-896168,1

0777-345776,1

060-2630504,1

060-2630504,1

060-2630504,1

0714-222012,1

0716-839973,1

0773-405351,1

0112-796896,1

0414-397802,1

0777-447446,1

0773-559133,1

0716-822250,1

];

Y:

NoConcatenate

LOAD Phone_No where Count > 1;

Load Phone_No,Sum(Calls) as Count Resident X Group By Phone_No;

Left Join (Y) LOAD Phone_No, Calls,No Resident X;

Drop Table X;

Hi,

one solution with preceding loads only:

```tabCalls:
Calls
Where Calls >= 2;
Sum(Calls) as Calls
Group By Phone_No;
@2 as Calls
(html, codepage is 1252, no labels, table is @1);
```

hope this helps

regards

Marco

Hi,

Try like this

Data:

Calls

Where Calls >= 2;

Sum(Calls) as Calls

Group By Phone_No;

Calls

FROM DataSource;

Hope this helps you.

Regards,

Jagan.

Hi,

Use this Script

@2 as Calls

(html, codepage is 1252, no labels, table is @1);

NoConcatenate

tab1:

Sum(Calls) as Calls

Resident tab

Group By Phone_No;

NoConcatenate