Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Stored procedures 在db2存储过程中读取sql查询并从文件执行_Stored Procedures_Db2 - Fatal编程技术网

Stored procedures 在db2存储过程中读取sql查询并从文件执行

Stored procedures 在db2存储过程中读取sql查询并从文件执行,stored-procedures,db2,Stored Procedures,Db2,我不熟悉db2存储过程 我希望读取SQL文件作为参数,并希望执行SQL查询以获取记录 有人能帮我吗? 提前感谢。使用utl_文件过程读取文件并生成sql字符串。使用动态sql执行sql字符串。查看以下链接了解更多详细信息 utl_文件: 动态sql: 哪个操作系统运行Db2服务器?(Z/OS、i-Series、Linux/Unix/Windows)在Windows server 2012中,您希望使用哪种编程语言编写存储过程?(java,C++,C++,SQL PL,PL-SQL)?在PL S

我不熟悉
db2
存储过程

我希望读取
SQL
文件作为参数,并希望执行
SQL
查询以获取记录

有人能帮我吗?
提前感谢。

使用utl_文件过程读取文件并生成sql字符串。使用动态sql执行sql字符串。查看以下链接了解更多详细信息

utl_文件:

动态sql:


哪个操作系统运行Db2服务器?(Z/OS、i-Series、Linux/Unix/Windows)在Windows server 2012中,您希望使用哪种编程语言编写存储过程?(java,C++,C++,SQL PL,PL-SQL)?在PL SQL中尝试编码?到目前为止你编码了什么?请在问题中包含您的代码。