按顺序放置数据 [英] Putting data in order

查看:81
本文介绍了按顺序放置数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我的报告以AA999999格式返回文件编号。这些数字不是按字母顺序排列,而是按数字顺序排列。我怎样才能把这些按顺序排好?


谢谢,


查理

解决方案

< blockquote>嗨查理。创建一个查询,按您想要的顺序对数据进行排序。然后将报告的记录源设置为查询,而不是表格。

Amy


您是否尝试按文本顺序获取alpha部分数字顺序中的数字部分?


如果您希望字母为alpha而非数字顺序,则可以在查询中执行此操作。为了测试这个,我创建了一个表Table1。使用一个文本字段Testdata我把数据放在

XXXnnnnnn中,其中alpha部分是3个字符,数字可以是任意长度。以下SQL查询以alpha为单位对数据进行排序,然后以数字顺序排序


选择左(testdata,3)为Al,右(testdata,len(testdata)-3)为表1中的nu命令by left(testdata,3),right(testdata,len(testdata)-3)


Hello,

I have a report that returns document numbers in the format "AA999999". These numbers are not in alphabetical and then numerical order. How can I put these in order?

Thanks,

Charlie

解决方案

Hi Charlie. Create a query that sorts the data in the order you want. Then set the Record Source of the Report to be the query, instead of the table.
Amy


Are you trying to get the alpha part in text order and the numeric part in number order ?


If you want the fields in alpha then numeric order you can do it in a query. To test this I created a table "Table1" with one text field "Testdata" where I put the data in the form
XXXnnnnnn where the alpha part was 3 characters and the numeric could be any length. the following SQL query orders the data in alpha then numeric order

select left(testdata,3) as Al,right(testdata,len(testdata)-3) as nu from Table1 order by left(testdata,3),right(testdata,len(testdata)-3)


这篇关于按顺序放置数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆