I am new to teradata, I haved DB2, in which for connection to DB is quite easy, just call profile and connect to db and we can use UNIX command after SQL if need to do with that.
I have searched abt TeraData, but didn't find the solution , Here we need to call BTEQ which is not supported UNIX command, for each SQL we need to use export in temp files if want to do any calculation on it. If there is any other way to do it, Please share...
One more thing, I have tried to write a small script , But this is giving error :
echo "This script will connect to teradata and fetch the data"
select * from dbc.tables;
This script will connect to teradata and fetch the data
*** Warning: EOF on INPUT stream.
./teraconchk.sh: line 9: BTEQ: command not found
Try to add semicolon after password.
Below my script shell example
.SET WIDTH 200;
LEGAL_ENTITY_CD = '$LE';
I am newdie to shell scripting, Please suggest for my issue.
When I try this code in shell script, I am getting the error ".LOGON: command not found".
I executed the simple sql script in shell but its showing the below errors
".LOGON: command not found"
".LOGOFF: command not found"
you need bteq to log in using bteq
/usr/bin/bteq << EOF >> LOG 2 >> LOG
.LOGON host/user ,pass;
should be saranya and datastage4you solve with that step.