Your need to share the DDL of my_table.
It looks like you di some internal data type conversions. It is likely that you fail at sales_amt and / or Tax_AMT.
In case these are NULL you map them to '#@@#' and then you want to cast them to an integer, which is not possible...
Der Beginn aller Wissenschaften ist das Erstaunen, dass die Dinge sind, wie sie sind.-Aristoteles
When Sales_Amt or Tax_Amt is null you try to cast '#@@#' as an integer.
Btw, this is the same as your trim/case:
coalesce(trim(col), '#@@#')
Dieter
I guess there are three problems in your SQL
1. As specified by Ulrich & Dieter, it seems like Sales_Amt or Tax_Amt is NULL and caz you are returning character data '#@@#' in case of null values and casting it to INTEGER results in the error.
Just to be sure, add a clause in where to avoid null values for Sales_Amt and Tax_Amt. The query should run.
2. The other problem in the query is that you have an extra bracket in the last CAST statement. You need to remove one from the end caz it doesn't have an opening bracket.
3. The last CAST statement is not separated by a comma. You will need to add that as well.

