Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loop question to do sql update using two input files

Status
Not open for further replies.

chapm4

IS-IT--Management
Nov 12, 2001
38
0
0
US
I am writing a script in qnx to do a sql update and need some help. I am using two input files. Here is what I am doing that obviously doesn't work:

for wid in $(cat workId.txt)
for seqNum in $(cat sequenceNumber.txt)
do
csql -c "update workIdStack SET workId=$wid where_ sequenceNumber=$seqNum"
done
done

The underscore in this case is a line continuation. This may be a simple issue but I am lost.
 
Try this if the underscore is creating the problem:
I think you would need a space after the word 'where' ?

for wid in $(cat workId.txt)
for seqNum in $(cat sequenceNumber.txt)
do
csql -c "update workIdStack SET workId=$wid where \_ sequenceNumber=$seqNum"
done
done


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top