|
|
Archives of the TeradataForum
Message Posted: Fri, 04 Oct 2002 @ 13:57:02 GMT
Subj: | | Re: Numbering records (simple question) |
|
From: | | Berghuis, Frank |
I use CSUM for this:
csum(1,, )
Generates a numbered column, with the number in the order of first, and second. You can specify ascending and
descending on the columns. Also, if you 'group by ' it will restart the numbering at 1, each time the value in
changes. Examples: sel csum(1,tablekind asc, databasename desc) ranking ,databasename, tablename, tablekind, creatorname from dbc.tables
where tablename like '%290%' group by tablekind
| |