Wednesday, March 15, 2023

To select the nth row in a SQL database table?

Query:


SELECT * FROM

    (

        SELECT ROW_NUMBER () OVER (ORDER BY RecId) AS RowNum, *   FROM SALESTABLE

    ) sub

WHERE RowNum = 9

No comments:

Post a Comment

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...