The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
how to use data in unix text file as input to an sql query from shell
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
how to use data in unix text file as input to an sql query from shell
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
07-01-2009
Ramesh_srk
Registered User
Join Date: Jun 2009
Location: Chennai,India
Posts: 20
Try this,
#!/bin/bash
exec<InputFilename
while read line
do
$ORACLE_HOME/bin/sqlplus -s username/Password <<!
select * from Tablename where Fieldname='$line'
/
!
done
Ramesh_srk
View Public Profile
Find all posts by Ramesh_srk
Find Ramesh_srk's past nominations received
Find Ramesh_srk's present nominations given