Reputation: 57
how can i show the result from row 5 to the end ?
select PersonID AS Field_Value , CONVERT (varchar(8), PersonID) + ' // ' + pfname +' '+ plname AS Display_Value
from [*].[*].[*]
thanx for help
Upvotes: 0
Views: 46
Reputation: 1071
Using Common Table Expresion and Window Functions:
WITH CTE AS (
SELECT PersonID AS Field_Value,
CONVERT(VARCHAR(8), PersonID) + ' // ' + pfname + ' ' + plname AS Display_Value,
ROW_NUMBER() OVER( ORDER BY PersonID) RN
FROM
[*].[*].[*];
)
SELECT * FROM CTE WHERE RN > 5
Upvotes: 2