SQL Script to use variable value from input file

Here is the requirement, When I run the "run file KSH (sql)", it should substitute
'${pCW_Bgn_DT}' with 201120
and
'${pCW_End_DT}' with 201124

Input File
----------
$ cat prevwk.dat
201124 20110711

run file KSH (sql)
------------------
In this file, I want to use the variables in SQL like
SELECT * FROM TABLE WHERE FSC_DATE BETWEEN '${pCW_Bgn_DT}' and '${pCW_End_DT}'

Can you guys help me.
Thanks

Try this in you shell script, before your SQL statement:

cat prevwk.dat | read pCW_Bgn_DT pCW_End_DT