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.
请帮助我处理这段代码...我有一个包含这些字段的表(cCLID,cCLID,nLID)nLID 是一个数字,但是当我对其进行排序时,结果显示这个序列(1,10,2,3, 4,5...)但我想这样排序(1,2,3,4,5...10)
sDataSet.Tables(tmp(0).Name).Select("cCLID='" & _cCLID.Text_Value & "'", "Convert(Numberic(18,0),nLID) ASC")
使用类似 Sort_NLID 的临时字段并将其填写在 SQL 中,如:
CASE WHEN ISNUMERIC(NLID) = 1 THEN CAST(NLID AS INTEGER) ELSE -1 END AS Sort_NLID
然后排序
sDataSet.Tables(tmp(0).Name).Select("cCLID='" & _cCLID.Text_Value & "'", "Sort_NLID, nLID")