I have a sql script where I create all the sequence used in the application as below. These values will be different for different servers. Instead of giving these hard coded values, I want to specify these in some config file Is there a way that I can read all these values from the config file in my sql script
CREATE SEQUENCE tbl1_tbl1id_seq AS INT START WITH 1 INCREMENT BY 2 MAXVALUE 50000;
CREATE SEQUENCE tbl2_tb21id_seq AS INT START WITH 1 INCREMENT BY 2 MAXVALUE 50000;
CREATE SEQUENCE tbl3_tbl3id_seq AS INT START WITH 1 INCREMENT BY 2 MAXVALUE 50000;
I could do that in the below fashion. I wrote a shell script which would read from the config file line by line, and generate sql statement writing to a new file. In the end, I excecute the new sql script from the script itself
The config.txt contains the below lines,