Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
No | Store | ProductA | ProductB | ProductC | ProductD | ProductE | Amount |
1 | StoreA | A | A | A | A | A | 99 |
2 | StoreA | A | F | F | F | F | 2000 |
3 | StoreA | A | D | D | D | D | 300 |
4 | StoreA | E | E | E | V | J | 4000 |
5 | StoreA | E | T | C | C | U | 800 |
6 | StoreA | B | B | B | B | B | 999 |
Hi Community,
I want to exclude row1 and row 6, how should i put it in my script?
LOAD No,
Store,
ProductA,
ProductB,
ProductC,
ProductD,
ProductE,
Amount
From Excel
where not ProductA=ProductB=ProductC=ProductD= ProductE;
Thanks everyone for your help.
I put like this:
DATA:
LOAD No,
Store,
ProductA,
ProductB,
ProductC,
ProductD,
ProductE,
Amount
FROM DataSource
WHERE not ((ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE));
Hi,
Try this.
DATA:
LOAD No,
Store,
ProductA,
ProductB,
ProductC,
ProductD,
ProductE,
Amount,
If((ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE) ,1,0) as Flag
FROM
C:\Users\Kaushik\Desktop\Book1.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
Data:
Load No,
Store,
ProductA,
ProductB,
ProductC,
ProductD,
ProductE,
Amount
Resident DATA where Flag=0;
Drop table DATA;
Regards,
Kaushik Solanki
Hi,
I would do sth like:
WHERE replace(ProductA & productB, PorductC, ProductD, productE, productA, '') <> ''
The advantage is that you can add a field very easily.
Fabrice
HI,
Try like this
DATA:
LOAD No,
Store,
ProductA,
ProductB,
ProductC,
ProductD,
ProductE,
Amount
FROM DataSource
WHERE (ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE);
Hope this helps you.
Regads,
Jagan.
Thanks everyone for your help.
I put like this:
DATA:
LOAD No,
Store,
ProductA,
ProductB,
ProductC,
ProductD,
ProductE,
Amount
FROM DataSource
WHERE not ((ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE));
Hi,
Missed Not in my where condition, Good Catch. Anyway close this disucssion.
Regards,
Jagan.
Hi SurynnChin,
Try this
LOAD
No
Store
ProductA
ProductB
ProductC
ProductD
ProductE
Amount
FROM Excel file
Where not No=1 and 6;