"Sql loop with bash"의 두 판 사이의 차이
DB CAFE
(새 문서: <source lang=sql> #!/bin/bash cat textfile.txt |while read Name do sqlplus -s userid/password@db_name > output.log <<EOF set verify off set heading off select customerid from custo...) |
|||
12번째 줄: | 12번째 줄: | ||
EOF | EOF | ||
</source> | </source> | ||
+ | [[category:oracle]] |
2024년 1월 2일 (화) 00:15 기준 최신판
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
#!/bin/bash
cat textfile.txt |while read Name
do
sqlplus -s userid/password@db_name > output.log <<EOF
set verify off
set heading off
select customerid from customers where customername like '%${Name}%'
/
exit
EOF