I have been trying to run a transformation where I have Table Input with SQL to fetch or query data, tied to output for an excel spreadsheet.
With the following SQL I get multiple errors depending on what I add or take away. I am connected to Oracle databases.
SELECT FROM .View
BETWEEN ' 2016-01-01'
AND ' 2017-01-01'
AND View.Main_Category1 LIKE '%BUCKETS%'))
Transformation detected one or more steps with errors.
You don't seem to be selecting any columns from the table.
There are leading spaces in the dates and you should apply TO_DATE to the dates that are in string format.
There are unnecessary parentheses that could be removed.
Also, I think that '.View' should be just 'View'.
SELECT column1Name, column2Name, ... FROM View WHERE View.Opened_Date BETWEEN TO_DATE('2016-01-01', 'yyyy-mm-dd') AND TO_DATE('2017-01-01' , 'yyyy-mm-dd') AND View.Owner_Group='OwnerJ' AND View.Main_Category1 LIKE '%BUCKETS%'