trimming sql statment for s2o check for SELECT