How can I structure a big SQL statement defined in the Job variable File with the SelectStmt Variable without getting an error when using Carriage Return LineFeeds
Don't use them. :)
Seriously, TPT does not parse the quoted strings in the job variable files.
Thus, TPT cannot remove them.
And CRLF characters are not valid characters within Teradata requests.
Therefore, you should make sure that your request text does not have any CRLF characters.
Thank's! Makes a large SQL statement not really readable/serviceable/usable within TPT:-(
When I have queries, I indent them using pipes for readability :
, varchar SelectStmt = ' select Column1' || ' , to_char(Column2, ''YYYY-MM-DD HH:MI:SS'')' || ' , Column3' || ' , ''constant'' as Column4' || ' from DatabaseName.ViewName' || ' where Column5 = ''Something'';'
Don't forget to add a space between two lines.