As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Adding Serial Numbers to SQL Data

From sasCommunity
Jump to: navigation, search


Structured Query Language (SQL) does not recognize the concept of row order. Instead, query results are thought of as unordered sets of rows. Most workarounds involve including serial numbers, which can then be compared or subtracted. This presentation illustrates and compares five techniques for creating serial numbers..

Online Materials

View the pdf for the paper.


  • Page 20, paragraph starting with "Notice" and ending with "housekeeping": Text should have PaperBody style and resemble the rest of the narrative.

You can also see the PowerPoint Presentation.


  • Slide 20: extraneous dot after FROM clause.

This could be a link to a zip file with sample data.

Also consider including some sample code:

the <source> tag provides SAS syntax highlighting and offsets it nicely

Contact Info

Please check out my user page. You can also email me.