求助,在AIX下sqlplus中sql的单引号被转成了双引号。。。???
本帖最后由 Rookie_CEO 于 2012-09-11 15:05:17 编辑
#!/bin/ksh
. /etc/profile
. ~/.profile
get_db_values=$(sqlplus -s zxx/zxx <<EOF
set heading off
set feedback off
set pagesize 0
set linesize 300
select instance_number,instance_name,host_name from v\$instance where instance_name='zxxtest';
exit;
EOF)
echo "$get_db_values"
---执行之后报错如下 为什么脚本中我明明写的是单引号,在执行的时候却解析成了双引号,报错
./test01.sh
[YOU HAVE NEW MAIL]
select instance_number,instance_name,host_name from v$instance where instance_name="zxxtest"
*
ERROR at line 1:
ORA-00904: "zxxtest": invalid identifier
select
*
ERROR
ORA-00904:,instance_number,instance_name,host_name
at
"zxxtest":,from
------解决方案--------------------额,还有这种情况?