Hi Master,
I need to create dan run script in linux to get data from teradata
I did this
---------- Post updated at 02:28 AM ---------- Previous update was at 02:25 AM ----------
LOG_DIR="/home/";
OUTDIR="/home/";
SCRIPT_NAME=�test";
DUMPFILE="${OUTDIR}${SCRIPT_NAME}"_"$(date +"%Y%m%d%H").txt";
USERID=�A12345";
PASWD=�B342a12";
LOGNAME="test_"$(date +"%Y%m%d%H")".sql";
#======================================================================================#
/usr/bin/bteq << END-OF-SQL >> ${LOG_DIR}${LOGNAME};
.logmech ldap;
.LOGON tdprod/${USERID},${PASWD};
.Set Format off
.Set Recordmode off
.Set Echoreq on
.Set Separator '|'
.width 3000
.Set Titledashes off
.Export REPORT FILE = ${DUMPFILE}
SELECT
top 5*
FROM transactional_ldp
.Export Reset
.LOGOFF
.QUIT
END-OF-SQL
but it always ended up with errors
line 7: unexpected EOF while looking for matching `"'
line 33: syntax error: unexpected end of file
Please help