I am calling a .sql file from my shell script. I want to pass a shell variable to the .sql file and use it in my query.

employee1.ksh
#!/usr/bin/ksh
db2 connect to testdb user testuser
$deptid = 10
db2 -vsf /home/testdir/query.sql
db2 terminate

query.sql
select * from employee where deptid = (I want to use $deptid here)

Is it possible to do something like that?...