Re: Repeat a Query
Posted in 1998
"Vijay R. Anisetti" — — source: Informix-list mailing list archive (1991-1998)
Deepa Sankaranarayan wrote:
>
> Hi All
>
> Is there anyway that I can repeatedly execute a query. I want to insert
> a particular row say 2000 times. Sybase has something like "go 2000".
> Any equivalent in informix?
>
> Deepa
I can't think of any built-in feature like that in Informix, but the
following should give the same result:
count=0
while [ $count -lt 2000 ]
do
echo "insert into table_name values ( val1, val2, ...);" | dbaccess
database_name > /dev/null 2> /dev/null
count=`expr $count + 1`
done
hope this helps.
Vijay R. Anisetti