Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear experts,
I have a set of data multiple attributes including create_date and start_date.
During the next year, i have to limit the data
From all the registers, I have filter those ones that either started or where created after 01-03-2019 BUT I have to EXCLUDE those that were created and started in between 20200301 and 20210301.
Is there a way to EXCLUDE a range of dates?
What I need is something like this:
load *
FROM [lib://XXXXXXXX.qvd] (qvd)
where (create_date >= '2019301' or start_date >= '20190301') and ''EXCLUDE''
(create_date >= '2020301' and start_date < '20210301')
Thanks in advance
G'day @ruben_moya,
I think what you're asking for is this ...
where (create_date >= '20190301' or start_date >= '20190301')
and not (create_date >= '20200301' and start_date < '20210301')
Cheers, Barnaby.
I think you mean by EXCLUDE -> NOT
so your where condition would be :
and NOT (create_date >= '2020301' and start_date < '20210301')
you already wrote the condition
but you need to make sure that the dates in the QVD file are of the same format that you are using in the where condition
if they are the same then you need to remove the single quotes from the values you are supplying in the where condition
Hi @ali_hijazi
thanks for the answer, but i need the Excluding part. There is no such an 'exclude' function as far as I know.
G'day @ruben_moya,
I think what you're asking for is this ...
where (create_date >= '20190301' or start_date >= '20190301')
and not (create_date >= '20200301' and start_date < '20210301')
Cheers, Barnaby.
I think you mean by EXCLUDE -> NOT
so your where condition would be :
and NOT (create_date >= '2020301' and start_date < '20210301')
Really? was it that simple? that's awkward...
Thanks a lot guys!