|
|
Archives of the TeradataForum
Message Posted: Thu, 07 Oct 2004 @ 21:32:51 GMT
Subj: | | Order by substr(columnname from 7) |
|
From: | | Vanole, Mike |
Hi,
I was looking around in dbc.accountinfo and needed to sort the accountnames by our standard account description but maintain the priority and
ASE stuff. This required skipping over the priority and ASE stuff because they would mess up the sort ($R&Ladhoc, $M&Ldeveloper) for example. A
regular "order by accountname;" would put $M&Ldeveloper on top, and this was no good. So I tried to "order by substr(accountname, 5);" and it
actually worked! Although the manual states you can ORDER BY expression, there are no examples of this, so I thought I would share. Are there any
other ORDER BY possibilities not shown in the manual? I tried a sub-select -- no good, but wouldn't THAT be a neat trick, although my head hurts
trying to imagine why.
Mike
| |