我想在MS Access中对数据进行排序,并为此使用查询。在我的表中的数据是这样的:在MS Access中排序
RadButtonNo
-------------------
AA001056
AA001579
B000049
AA001261
AA001158
AA001108
AA001166
AA001165
AA001164
AA001163
AA001162
对于我的输出,我想第一个数据是其中由字母的数据。之后,我想显示字母和数字。
AAAAAAA
AABBBBB
AAZZZZZ
ABA1001
我使用下面的查询:
SELECT RadButtonNo, ShortName, InspectionDate, Findings, Status, QueryForNot1.Initials, DeptName, Lost, TableApron.InServelDate, TableApron.RemovedDate,
TableApron.PrivateUserName, TableApron.PrivateUserEmail, TableApron.ApronType, TableApron.Manufacturer
FROM TableApron
LEFT JOIN QueryForNot1 ON TableApron.RadButtonNo=QueryForNot1.RadButtonNoI
WHERE (((TableApron.Lost)="N" Or (TableApron.Lost)=[@Lost])
ORDER BY LEN(TableApron.RadButtonNo) DESC , TableApron.RadButtonNo;
有人能解决这个问题,这样会产生我想要的输出,所以,它会是这个样子?通过附加一个字符/或多个与数字条目
ORDER BY LEN(TableApron.RadButtonNo) DESC, TrimTxtString([TableApron].[RadButtonNo]), TrimNumString([TableApron].[RadButtonNo]);
究竟是什么问题?请重新阅读和编辑您的问题,这是难以理解的。 – Andre
@ Andre451我编辑了这个问题,你能理解它吗 –
一个正常的字段将排序为你的榜样,请问你的问题是什么? – Gustav