I have the following SQL being used by a SQL Executor;
FME_SQL_DELIMITER ;
DROP TABLE dbo.[PREMISE_CONTRACT_ROLLBACK];
SELECT * INTO dbo.[PREMISE_CONTRACT_ROLLBACK] FROM dbo.[PREMISE_CONTRACT];
It runs successfully using the "Run" option when I'm accessing the transformer itself. However, if I just add a Creator > SQL Executor > Logger and run the workbench, the following error occurs;
Microsoft SQL Server Non-Spatial Reader: Query failed, possibly due to a malformed statement. Query Text `SELECT * INTO #fme_tempAdoDataTypeTable_spatialReader FROM ( SELECT * INTO dbo.[PREMISE_CONTRACT_ROLLBACK] FROM dbo.[PREMISE_CONTRACT] ) AS customQuery WHERE 1=0'. Provider error `(-2147217900) Incorrect syntax near the keyword 'INTO'.'
Microsoft SQL Server Non-Spatial Reader: Getting Custom SQL schema failed. Make sure all columns are named (any ambiguous columns, e.g. GEOM.STBuffer(1), must have an AS clause). If there is an ORDER BY clause, either remove it or add a TOP clause
It looks like FME is wrapping the statement in its own statement and causing the syntax issue, but I don't appear to be able to get around this.
My only thoughts right now are to add a reader and a writer, but the process is already long enough without reading unnecessary data into memory.