Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting a string 1

Status
Not open for further replies.

mstelmac

Technical User
Oct 22, 2003
53
0
0
US
CR developer version 10
Clearquest version 2003.06.15
MS SQL Server 2000

Hello everyone, I have a report format that prints a list of change request records. Unfortunately all data is pushed into CR as strings. Can anyone help me sort the CR field? My current output looks like this:
CR115
CR116
CR8

I would rather it sort like this:
CR8
CR115
CR116

Any help would be greatly appreciated.
 
If the numbers always start in 3rd position, then create a formula:

left({table.string},2) + totext(val(mid({table.string},3)),"000") //add as many zeros as the maximum number

Use this formula to sort, but display the actual field in your report.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top