Can anyone help. I need a where statement in my script which only includes any rows with the following criteria :
All data for company 'ABCD' where the status is NOT in authorised status and the create date > 365 ago
The script below does not work.
Where Company = 'ABCD' and
(Status<>'Authorised' and CreateDate>=(Today()-365))
Hi Phil ,
Where Company = 'ABCD' and Status<>'Authorised' and CreateDate>=Date((Today()-365)) Or
Where Company = 'ABCD' and Status<>'Authorised' and Num(CreateDate)>=(Today()-365)
Is case sensitive,check that or you can do this:
where upper(Status) <>'AUTHORISED'
NOT MATCH(upper(Status), 'AUTHORISED')
the other thing is the format of the date field, but i think thats working.
The above suggestions dont work.
My actual where statement works, but it excludes all authorised and shows all records which are less than 12 months old.
What I want is for it to show all records with an exception of the records less than 12 months old which still have a status 'authorisation'.
i.e. If the record is less than 12 months old then it still needs to show the authorised fields.
Does that make sense?