You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Use the "ROW_NUMBER" function to include a row number in your query. The syntax is:

ROW_NUMBER () OVER (ORDER BY insert the field name or names that you wish to order the results by)


This example sorts fields from the item_ext table by item_hrid:

SELECT

ROW_NUMBER () OVER (ORDER BY ie.item_hrid) AS seq_no,

ie.item_hrid,

ie.barcode,

ie.effective_location_name,

ie.effective_call_number

FROM folio_derived.item_ext AS ie


Result:

  • No labels