home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!fcom.cc.utah.edu!rob
- From: rob@fosters.med.utah.edu (Rob Sargent)
- Subject: Re: SQL sort problems (group by?)
- In-Reply-To: sreit@ctp.com's message of 4 Jan 93 19:38:01 GMT
- Message-ID: <ROB.93Jan5113657@fosters.med.utah.edu>
- Sender: news@fcom.cc.utah.edu
- Organization: University of Utah
- References: <1993Jan4.193801.25423@ctp.com>
- Date: 5 Jan 93 11:36:57
- Lines: 24
-
-
- My first inclination would be to peal off the last two digits of the
- Claim # into a separate column in the result/report/temp_table, then
- use it in your ordering.
-
- If claim number is an int you would have to do something like
- sub_no = substring(convert(varchar(15), claim_no),
- datalenght(convert(varchar(15), claim_no)) -2,
- 2)
-
- or better interms of numberic, rather than alphabetic, sort ordering
-
- sub_no = claim_no % 100
-
- but this would drop leading zero (if you care).
-
- rjs
-
- --
- Rob Sargent s-mail: Dept. of Human Genetics
- e-mail: rob@fosters.med.utah.edu U. of Utah Medical School
- Eccles Genetics Bldg
- Salt Lake City, Utah 84112
-
-