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

sorting Access table similar as Visual FoxPro

Status
Not open for further replies.

pietjan

Programmer
Jun 3, 2002
4
US
Hi All,

I'm trying to sort my Access query, but every time I export this query to another - statistical - application, this application gives an error not "sorted". However, if I follow the same steps in Visual Foxpro (VFP), there is no problem at all with this other application. The sort order in VFP is "machine". The sort order in Access is "general". In Access there is no option for "machine".
Do you guys know of any solution?

Thanks!

 
First we need to make sure we agree on definitions here or we'll all get confused.

1) Queries themselves are not "exported" - but the RESULTS of a query can be.

2) If you want to EXPORT the SORTED result of a query, do your SORT in the query definition, and convert the query to a MAKE TABLE query.

When you run it, you will create a "sorted" list of data that matches what you specified in the query.

Now, as to your question of "machine" sort vs "general" sort - that is a bit of a throwback to the days when sorting was done by ASCII value, not by "real" value - I think if you need a "machine" sort order, you'll need to set an ASCII value for your sort fields first character or so, and sort by the ASCII value of it..

For those of you unclear on this, an uppercase A in ASCII decimal notation is 65.
( 01000001 ) An uppercase B is 66, ( 01000010 ) etc. But a LOWERCASE "a" is decimal 97, and in a "machine" sort like we did in the old days, it would come AFTER an UPPERCASE "B"...

Got that? Confused yet?... let's not even talk about EBCDIC.. LOL

Jim How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
Hi Jim,

You're absolutely right, I meant the query results will be exported. In the query definition the table is being sorted, and subsequently exported to a Tab-delimited file with TransferText.

PietJan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top