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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort numerical data from alpha numerical data

Status
Not open for further replies.

prodtest

Technical User
Aug 29, 2003
55
GB
Hi
I have a query which shows customer orders and purchase orders. The data is as below:

Order no Customer Date Item
-------- -------- ---- ----
4056 Fred 01/08/2004 68709
4059 Paul 05/04/2003 68701
PO050879 TIS 07/01/2005 68711
4025 James 03/02/2005 68705
PO005205 MPE 07/05/2005 68715
etc

I need to be able to seperate the 4 digit customer order numbers from the PO****** alpha numerical numbers.
Is there something I can put in the criteria field which seperates this out, I did try >4000 but it still shows the PO numbers.
Any Ideas ???

Cheers
Ben
 
Sort numerical data from alpha numerical data
ORDER BY Val(Replace([Order no],'PO',''))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I have just relised how to do exactly what you just wrote !! Was having a major mind blank this morning !!
Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top