Remove non ansi sql in preparation for move to support more DBMS