在Informix存储过程中使用UNLOAD语句 [英] Using an UNLOAD statement in an Informix stored procedure

查看:312
本文介绍了在Informix存储过程中使用UNLOAD语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个Informix过程. 我创建了一个临时表,但是我想将此数据导出到文本文档中. 我不能在SPL中使用UNLOAD语句;有人可以帮我吗?

I'm writing an Informix procedure. I created a temp table, but I want to export this data in a text document. I can't use an UNLOAD statement in SPL; can somebody help me?

推荐答案

服务器无法识别UNLOAD语句.诸如DB-Access,ISQL和I4GL之类的程序会识别它并将其模拟为一条语句(当然,基本上是SELECT,当然是从服务器读取数据并将其写入客户端文件).因此,该语句在SPL(存储过程语言)中不起作用,因为该语句由服务器上的服务器运行. (断开连接的原因之一是服务器无法直接写入客户端上的文件.)

The UNLOAD statement is not recognized by the server. The programs such as DB-Access, ISQL and I4GL recognize it and simulate it as a statement (basically, as a SELECT, of course, reading the data from the server and writing it to a file on the client). Consequently, the statement won't work in SPL — Stored Procedure Language — because that is run by the server on the server. (One reason for the disconnect is that the server can't write direct to a file on the client.)

因此,您需要做不同的事情. Ricardo Henriques 在他的

So, you'll need to do things differently. The solution suggested by Ricardo Henriques in his answer is entirely sensible, as long as the file being created on the server machine is OK.

这篇关于在Informix存储过程中使用UNLOAD语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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