我需要使用sql plus在一个sql文件中调用另一个sql文件 [英] I need to call another sql file within an sql file using sql plus

查看:208
本文介绍了我需要使用sql plus在一个sql文件中调用另一个sql文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用sql plus在sql文件中调用另一个sql文件.这是我到目前为止的脚本,它无法正常工作.我必须将其编码为Unix vi文件.我对此很陌生,所以有人会帮忙.先感谢您.

I need to call another sql file within an sql file using sql plus. This si the script i have so far and its not working. I have to code it in a unix vi file. I am new to this so would someone mind helping. thank you in advance.

 call=`$LIVE_SQL/sqlfile2.sql`
 if  &call = 0  then
   echo "ERROR: $LIVE_SQL/sqlfile2.sql file not found"
   exit 1
 fi

推荐答案

从SQLPLUS内部调用其他SQL文件的命令是:start(或@)

The command to call other SQL files from within SQLPLUS is : start (or @)

从SQL脚本获取反馈:SQLPLUS不是Bash.可能,但不是真正的初学者.

Getting feedback from the SQL script : SQLPLUS is not Bash. It is possible, but not really beginner stuff.

这篇关于我需要使用sql plus在一个sql文件中调用另一个sql文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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