Execute teradata queries from a file

 
 
In a .txt file i have a set of teradata queries which i need to execute and capture result for all queries.Is there any way to run teradata queries from a file?

If you are using tdsql, try one of these...

tdsql < queryfile.sql > queryfile.results

or

cat queryfile.sql | tdsql > queryfile.results

or

tdsql >>EOD
:::place sql commands here
::::
:::
EOD