设置查询定义字段的格式
我在 iSeries SQL 中有以下查询,并将其输出到文件中。
SELECT SSLOTMAK, SSLOTMDL, SSLOTYER, sum(SSCOUNT)
FROM prqhdrss
GROUP BY SSLOTMAK, SSLOTMDL, SSLotyer
HAVING sum(SSCOUNT) > 4
ORDER BY SSLOTMAK, SSLOTMDL, SSLOTYER
当我运行它时,创建的字段 sum(SSCOUNT) 是一个 31 Packed 字段。 这不允许我将其发送到我的电脑。 如何强制 SQL 将字段创建为非压缩字段。
I have the following query in iSeries SQL which I output to a file.
SELECT SSLOTMAK, SSLOTMDL, SSLOTYER, sum(SSCOUNT)
FROM prqhdrss
GROUP BY SSLOTMAK, SSLOTMDL, SSLotyer
HAVING sum(SSCOUNT) > 4
ORDER BY SSLOTMAK, SSLOTMDL, SSLOTYER
When I run it, the field created be the sum(SSCOUNT) is a 31 Packed field. This does not allow me to send it to my PC. How can I force SQL to create the field as a non-packed field.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试一下,
由于列的名称“count”,我已将其转换为整数。 如果该列具有浮点值,您可以使用
numeric(8, 2)
代替。Try this
I've casted to integer because of the name of the column "count". If the column has floating-point values you can use
numeric(8, 2)
instead.您打算如何将其移植到您的电脑上? 我知道的大多数 iSeries 方法都会自动将其转换为 PC 可读格式。
How are you trying to bring it to your PC? Most iSeries methods I know will automatically convert that to a PC-readable format.