Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have a date field (pay_made_dt) and I would like to only include records where the date is greater than 01/01/2018 or is null.
I have set nulldisplay = '-'
If anyone could help with this, it would be much appreciated.
Regards,
Daniel
Try this,
Load * from xyz
where (pay_made_dt >= Makedate(2018) or isnull(pay_made_dt));
Regards,
Kaushik Solanki
Hello Daniel,
maybe this where Statement in script
where
isnull(pay_made_dt) OR Date(pay_made_dt) > Date('01/01/2018')
;
something similar to this
load your_fieldname1,
your_fieldname2,
pay_made_dt
where len(trim(pay_made_dt))=0 or pay_made_dt > 43101;
Hello Daniel,
Trust that you are doing well!
Below are two workarounds:
1. Flag Field (Script Level)
Data:
LOAD *,
If(Len(pay_made_dt)=0 OR pay_made_dt>'01/01/2018', 1, 0) AS Flag;
LOAD * INLINE [
Product, pay_made_dt
Product 1, 01/01/2017
Product 2,
Product 3, 04/01/2018
Product 4, 05/01/2018
Product 5, 06/01/2018
];
2. Expression
If(Len(pay_made_dt)=0 OR pay_made_dt>'01/01/2018', pay_made_dt)
Hope this will help.
Regards!
Rahul Pawar
Thank you for all the responses.
Is it possible to help add the below:
where ((str.restricted_area_flg in ('Y') and c.voucher_fully_paid_dt > '2018-01-01') or c.voucher_fully_paid_dt is null)
Basically I want to show where the restricted_area_flg is Y and then the voucher_fully_paid_dt is either greater than 01/01/2018 or null.
Thanks,
Daniel
Try this
where (str.restricted_area_flg in ='Y' and pay_made_dt >YearStart(Today())) OR ( len(trim(pay_made_dt))=0 )
Hi Daniel,
You can also try
where ((str.restricted_area_flg in ('Y')) and (c.voucher_fully_paid_dt > '2018-01-01' or c.voucher_fully_paid_dt is null)
Regards,
Bhargav
where match(restricted_area_flg,'Y')=1 and (voucher_fully_paid_dt > 43101 or len(trim(voucher_fully_paid_dt))=0)