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
CodePudding user response:
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