Passing parameters inside db2 SQLs from an unix shell script
1
vote
1
answer
2004
views
I want to delete certain rows from a table based on my input values to a unix shell script. I am making connections and terminating it inside my shell script.
If you notice right now the field is hardcoded in the where clause.
**How can I pass that value as a parameter to the script?**
#!/bin/ksh
set -x
export DB2INSTANCE=db2clnt1
db2 ""CONNECT TO DBNAME user USER using passwd""
db2 ""delete from table where field =\'abcdefghijklmn\'""
db2 ""CONNECT RESET""
Asked by novice unix db2
(11 rep)
Jan 24, 2018, 11:26 PM
Last activity: Jan 25, 2018, 12:55 AM
Last activity: Jan 25, 2018, 12:55 AM