The below is the error message that is being thrown by Teradata when executing using a bteq script. This error message will be passed on as a parameter to another bat file where it will store this error message to the database.
Here <p>
tags and the word Error Message
are statically entered. Apart from that the error message returned by the Teradata is having a new line character in the last. Because of this new line character the batch script is unable to read the parameters list properly and the bat script is failing, hence the script is unable to capture the error message.
<p>Error Message: *** Failure 3807 SP_StoredProcedure:Object 'DB_Name.TableName' does not exist.
</p>
What I need to achieve is that the error message should not contain a new line either when it is generated from the Teradata or the new line should be removed using string parsing operations before passing to the second bat file as parameter. Tried TRIM and REPLACE functions to get rid of the new line characters, but that didn't help. Even after that the new line character is there.
When checked for the symbols present, this is what it shows:
Looking for a solution where the error message is free from the new line character when Teradata throughs this error.