Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我编写了一个使用 MS Access 数据库的 VB 程序。在其中一个表中,我设置了一个名为sampleIDText 类型的列。将值插入数据库后,它看起来像这样(未正确排序)。
sampleID
BK130101 BK1301010 BK1301011 BK130108 BK130109
我希望它像这样排序:
BK130101 BK130108 BK130109 BK1301010 BK1301011
知道如何解决吗?
也许是这样的:
SELECT TableX.ID FROM TableX ORDER BY Left([ID],6), CInt(Mid([ID],7));