Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data in following format:
Date | Class | Grade | Teacher | Notes |
---|---|---|---|---|
2017-05-28 | English | 5 | - | dfadf |
2017-05-29 | Math | 6 | Ms Walsh | dafd |
2017-05-20 | Science | 10 | Ms Helen | dafdaf |
2017-05-14 | Chemistry | - | Mr. Tom |
I want to create 2 where clause where i can look for:
1) during load script, delete the row where Grade is Null.
2) during load script, delete the row where Teacher is null.
Date | Class | Grade | Teacher | Notes |
---|---|---|---|---|
2017-05-29 | Math | 6 | Ms Walsh | dafd |
2017-05-20 | Science | 10 | Ms Helen | dafdaf |
May be something like this for your Excel
Table:
LOAD Date,
Class,
Grade,
Teacher,
Notes
FROM
where.xlsx
(ooxml, embedded labels, table is Sheet1)
Where Len(Trim(KeepChar(Grade, '0123456789'))) > 0 and
Len(Trim(KeepChar(Upper(Teacher), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))) > 0;
or
Table:
LOAD Date,
Class,
Grade,
Teacher,
Notes
FROM
where.xlsx
(ooxml, embedded labels, table is Sheet1)
Where Len(Trim(KeepChar(Grade, '0123456789'))) > 0 and Len(Trim(Teacher)) > 0;