rebuilt MV, cleaned up code
best practices ahoy -- SQL Server-friendly date format that also works in Oracle