text: set grammar to oracle;
  set datestyle='ISO,YMD';
  select trim('  aa  bb  ') from dual;
  select trim('  aa  bb') from dual;
  select trim(leading ' ' from '   !@#$    ') from dual;
  select trim(both 'x' from 'x!@#$x') from dual;
  select trim(leading 'x' from 'x!@#$x') from dual;
  select trim(trailing 'x' from 'x!@#$x') from dual;
  select trim(both 'x' from ' x!@#$x ') from dual;
  select trim(both 'xx' from ' xx!@#$x ') from dual;
  select trim(both 'xl' from 'xl!@#$l') from dual;
  select trim(both 'xl' from 'xl!@#$xl') from dual;
  select trim(both '' from 'xl!@#$l') from dual;
  select trim(both 1 from 121) from dual;
  select trim(both 1 from 121.1) from dual;
  select trim(both 7 from exp(2)) from dual;
  select trim(leading 0 from to_date('2016-10','yyyy-mm')) from dual;
  select trim(both to_char('a') from 'abc') from dual;
  select trim(both null from 'abc') from dual;
  