Quantcast
Channel: Teradata Downloads - Connectivity
Viewing all articles
Browse latest Browse all 445

Executing Teradata sql script in Shell file

$
0
0

Hi,
I am new to Teradata.
Please help me to know how to execute the simple Teradata script from LINUX shell script.
I created  a shell file Sample.sh and the code inside the shell file is below:
-----------------------
#! /bin/bash
.logon 127.0.0.1/DBC,DBC;
select * from employee where emp_id = $1;
.logoff;
.EXIT;
-----------------------
 I execute the script ./Sample.sh 20 > output.txt ( I am passing the value 20 as emp_id )
By executing the above command, I would like to print the output of the sql query in the file 'output.txt'.
But it is not working.
I am getting the below error:
".logon command not found
.logoff command not found"
Please someone help me on this.
 
 
 

Forums: 

Viewing all articles
Browse latest Browse all 445

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>