Hi,
i have a sql file named sample.sql. The query is given below.
select count(*) from $TABLE_NAME
In the main script, i am sourcing this sql. I need to replace the $TABLE_NAME with actual value, before running the query. How can i achieve that?
The logic i tried is given below:
VAR1=`cat sample.sql`
echo "$VAR1" > sample_Final.sql
The $TABLE_NAME is not replaced with actual value.
Thanks,
Bharathappriyam