Questions tagged «oracle-database»

3
Shell脚本-意外令牌'else'附近的语法错误
使用以下shell脚本,为什么我会出错 syntax error near unexpected token `else' Shell脚本 echo "please enter username" read user_name echo "please enter password" read -s pass echo ${ORACLE_SID} SID=${ORACLE_SID} if ["${ORACLE_SID}" != 'Test'] then sqlplus -s -l $USER_NAME/$PASS@$SID <<EOF copy from scott/tiger@orcl insert EMP using select * from EMP exit EOF else echo "Cannot copy" …

2
循环插入Oracle表
要求:在目录中的一台服务器中,存在多个文件。我需要读取文件名并填充到Oracle表中。 我已经写了这样的脚本,但是它不起作用: #!/bin/bash names = find /home/devuser -name 'BI*' sqlplus -s schema_name/passwd << EOF for name in {names[@]} do insert into table1(file_name,status) values('$name','N'); done commit; exit 苦恼DO INVALID IDENTIFIER。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.