generalize sql_select
Merge pull request #295 from hs3180/sqlserver

generalize sql_select