/ Published in: SQL
this little snippet can be used to compare an SAP Date (which might be empty, or '00000000') to today's date, for instance to query for rows that have been closed in the last x days. Can't CAST the date column (in 'YYYYMMDD' format) to a date for use in where clauses, since '00000000' can't be cast to a datetime