CORE-1661 Add support for MSSQL sequences

Fixed sequence select sql