rem create table dates as
select totalfatals, pedfatals, acddate,
        case
          when substr(acddate,0,2)=08
            then to_char((to_date('01-jan-2008')+substr(acddate,2,30)),'YYYYMMDD')
          when substr(acddate,0,2)=07
            then to_char((to_date('01-jan-2007')+substr(acddate,2,30)),'YYYYMMDD')
          when substr(acddate,0,2)=06
            then to_char((to_date('01-jan-2006')+substr(acddate,2,30)),'YYYYMMDD')
          when substr(acddate,0,2)=05
            then to_char((to_date('01-jan-2005')+substr(acddate,2,30)),'YYYYMMDD')
          when substr(acddate,0,2)=04
            then to_char((to_date('01-jan-2004')+substr(acddate,2,30)),'YYYYMMDD')
          when substr(acddate,0,2)=03
            then to_char((to_date('01-jan-2003')+substr(acddate,2,30)),'YYYYMMDD')
          when substr(acddate,0,2)=02
            then to_char((to_date('01-jan-2002')+substr(acddate,2,30)),'YYYYMMDD')
          when substr(acddate,0,2)=01
            then to_char((to_date('01-jan-2001')+substr(acddate,2,30)),'YYYYMMDD')
          else to_char((to_date('01-jan-2000')+substr(acddate,2,30)),'YYYYMMDD')
        end as accidentDate,
       
       
        
from acdl_crash_loc
;