使用 SQL select 和 JET 格式化结果
我使用 MS JET OLEDB 提供程序提取 Excel 文件中的数据。我的选择结果被传递到一个组件中,我无法更改该组件来动态生成 HTML 表。我的一些数据文件包含需要用逗号 (#,###) 格式化的数字。正如我所说,我无法更改输出组件来为我格式化字符串。有没有办法可以在 select 语句期间格式化结果?
我尝试了很多不同的方法,但没有任何效果。
这是一个选择我需要格式化注册的示例...
select
[SCHOOL NAME],
[ENROLLMENT],
[STUDENT / TEACHER RATIO]
from [Public School Districts$]
where [ENROLLMENT]<>null
任何帮助将不胜感激!
I have data in Excel files that I am pulling out using the MS JET OLEDB provider. The results of my select are being passed into a component that I cannot change to generate an HTML table on the fly. Some of my data files contain numbers that I need formatted with commas (#,###). As I said I cannot change the output component to format the string for me. Is there a way I can format my results during my select statement?
I have tried a bunch of different things but nothing has worked.
Here is an example select where I need to format enrollment...
select
[SCHOOL NAME],
[ENROLLMENT],
[STUDENT / TEACHER RATIO]
from [Public School Districts$]
where [ENROLLMENT]<>null
Any help would be greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现在无法尝试这个,但类似的东西
应该可以解决问题。
有一些标准格式可以帮助您实现国际化,但可能无法满足您的需求。只需谷歌
格式访问
即可。Can't try this out right now, but something like
should do the trick.
There are a few standard formats that would help you internationalization, but may not give you exactly what you want. Just google
Format Access
.