Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a data set with the following sttucture
Type | Date | Value |
---|---|---|
A | 1/1/2001 | 10 |
A | 2/2/2001 | 20 |
B | 15 | |
B | 90 | |
A | 70 |
The Data is such that Type B will always have null in Date Column. While loading the data, I need to filter all values where Date is null for Type A. In this case, I should not load the last row. How can I achieve this while loading the script? Any help?
I tried the below and it doesn't seem to work:
where ( if([Type]='A', [Date]>0));
(Type = 'A' and len(trim(Date))>0) or Type='B'
to get records with Type = 'A' and Date not null you can use len(trim(.....))
load
....
from
.....
where
Type = 'A' and len(trim(Date))>0
;
But I would also like to keep records where Type='B' and date will be null for them
(Type = 'A' and len(trim(Date))>0) or Type='B'
Could you use <>
where
Type <> ('A' and len(trim(Date))>0))
Where not (Type='A' and IsNull(Date))
Where Type<>'A' or not IsNull(Date)