VB with Access database sorting alphanumeric field
Posted Date Unknown Johnson Augustine 1 Comment

I have an MS Acces database with a serial number field , The serial no contains Numeric , alphanumeric  contents , How can i Sort Alpha numeric data and keeping the number sequence  USING SQL Query ? Is it possible ?

 

 Eg : Field contains

 

 1

2

.

..

..

..

10000

 

A1-1

A1-2

A3-

.

..

..

..

10000

 

B1-1

b1-3

 

.

.

.

.

 

but when i use order by ASC clause not getting the result in the above format , The field data type is varchar 

 

Could you help me to solve this ?


See All Responses Below...
Author
Message Rating
Posted on: 09/10/2012

It may not be possible to fully sort it. You can sort it for a,b, c,1,2 etc. Not any combination with one query I believe.

 

Another possibility is to put the first sort to a temporary table (eg Sort for character), then take that table for the next set of sort (sort for digit) and so on..

 

Please put this tektips.in . Somebody else will aso answer your question.

 

If you find any direct solution then let me know..

 

Tom

Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Comments
   Design  HTML
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site. 

TekTipsDownload
GateExam
Academic Projects
TekTipsExperts



 
Site optimized for IE7, 1280 X 768 and above. Copyright © 2010 - 2018 KTS InfoTech
Site Developed Using KTS WebCloud