Calling a procedure using parameters

Tools
Fan

Calling a procedure using parameters

Hi All,

I am writing a shell script, to call a store procedure, my shell script as two functions.

first function

get_trend_ids () {

Here I am connecting to the database and getting all the trend id's in a trend_ids.txt file, this file will be stored in /root/edw/trend/srcfiles

}

second function

Load_trend_data () {

Here I am connecting to the teradata database and calling a teradata store procedure as below

EXEC SP_TREND_DATA_LOAD( trend_ids) }

Now the file which I have generated using the first function has to be used in the place of trend_ids ,the procedure has to execute for all the values which are present in the trend_id.txt

EXEC SP_TREND_DATA_LOAD( trend_ids.txt) }

I tried using while read loop here , but I don't don't know how to use that here.

Can anyone tell me the above part, how can I code in the shell script.

Trend_ids's will have the below values

1
2
3
44
66666
5555

Regards,Deepti