Dynamic SQL query based on shell script parameters

Hi,

I need a script that will run a dynamic Oracle SQL. Dynamic meaning the SQL statement depends on the parameter.
For instance, something like this:

#!/bin/ksh -x

# Set environment
. /home/mine/set_vars

sqlplus $LOGINID <<! >> /home/mine/log.txt
select count(1) from $1
where init_date = $2;
exit;

Please help.. thanks in advance.

Did you try or just asking?
shell variable should work inside sql.

Thanks anchal... yes that worked
I found out there's some other problem in the code so it was not working.
I thought that's because of those params..