Sql -type options

This is all the cases covered where we had used splitx to determine type.

We could continue and add the type option to other sql_where procs, or wait until required.