Tutorial by Examples: 2012

Since there is no STRING_SPLIT function we need to use XML hack to split the string into rows: Example: SELECT split.a.value('.', 'VARCHAR(100)') AS Value FROM (SELECT Cast ('<M>' + Replace('A|B|C', '|', '</M><M>')+ '</M>' AS XML) AS Data) AS A CROSS apply data...
For getting the next 10 rows just run this query: SELECT * FROM TableName ORDER BY id OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY; Key points to consider when using it: ORDER BY is mandatory to use OFFSET and FETCH clause. OFFSET clause is mandatory with FETCH. You can never use, ORDER BY … FETC...

Page 1 of 1