Skip to main content

Hi,

Each time I tried to read an SQL database and include a where clause statement in the reader the FME was fails to do so, even when I tested the statement it was running successfully see below.

Does any one know how could id solve this error?

 

The error as the following:

2018-11-22 16:31:29| 1.8| 0.0|INFORM|FME API version of module 'VertexCreatorFactory' matches current internal version (3.8 20180604)

2018-11-22 16:31:30| 1.9| 0.1|ERROR |Microsoft SQL Server Non-Spatial Reader: Query failed, possibly due to a malformed statement. Query Text `SELECT BBSId], ID], Entity/Observation], Observation Date], Observation Type], Severity of Observation], Performed By], EmployeeID], Person Observed], CONT_SVC_PROVIDER], Not Listed], CONT_SVC_PROVIDER_Name], Name_Third_P_Inv], Group Type], Safe], At Risk], Description], Longitude], Latitude], Location], OrgAxisId], Reference], Workplace Activity], Offline_CONT_SVC_PROVIDER], Behaviours], Company], Platform], Created on], Created by], Last Modified on], Last Modified by], AtRisk Corrected], RelatedAction], OpenAction], Actions], Open Actions], Completed Actions], Overdue Actions], IsDeleted] FROM Aconex..vEnablonBBSObs] WHERE SELECT *

FROM Aconex.vEnablonBBSObs

WHERE "Observation Date" > '2017-06-30''. Provider error `(-2147217900) Incorrect syntax near the keyword 'SELECT'.'

2018-11-22 16:31:30| 1.9| 0.0|INFORM|Microsoft SQL Server Non-Spatial Reader: Closing `eODS' . Read operation complete

2018-11-22 16:31:30| 1.9| 0.0|ERROR |A fatal error has occurred. Check the logfile above for details

2018-11-22 16:31:30| 1.9| 0.0|INFORM|Translation FAILED with 2 error(s) and 0 warning(s) (0 feature(s) output)

2018-11-22 16:31:30| 1.9| 0.0|INFORM|FME Session Duration: 5.6 seconds. (CPU: 1.1s user, 0.6s system)

2018-11-22 16:31:30| 1.9| 0.0|INFORM|END - ProcessID: 9312, peak process memory usage: 683540 kB, current process memory usage: 683540 kB

A fatal error has occurred. Check the logfile above for details

Program Terminating

Translation FAILED.

 

Does any one know how could id solve this error?

 

Thanks,

Rawan

Hi,

You have given it a SELECT clause rather than a WHERE clause. You can just use "Observation Date" > '2017-06-30'

Just remove the "Select * from Aconex.vEnablonBBSObs where" and you will be away.

 

Cheers,

Todd

 

That is why you are getting this as the select query in the log:

 

SELECT CBBSId], ]ID], ]Entity/Observation], ]Observation Date], ]Observation Type], ]Severity of Observation], ]Performed By], ]EmployeeID], ]Person Observed], ]CONT_SVC_PROVIDER], ]Not Listed], ]CONT_SVC_PROVIDER_Name], ]Name_Third_P_Inv], ]Group Type], ]Safe], ]At Risk], ]Description], ]Longitude], ]Latitude], ]Location], ]OrgAxisId], ]Reference], ]Workplace Activity], ]Offline_CONT_SVC_PROVIDER], ]Behaviours], ]Company], ]Platform], ]Created on], ]Created by], ]Last Modified on], ]Last Modified by], ]AtRisk Corrected], ]RelatedAction], ]OpenAction], ]Actions], ]Open Actions], ]Completed Actions], ]Overdue Actions], ]IsDeleted] FROM Aconex.evEnablonBBSObs] WHERE SELECT * FROM Aconex.vEnablonBBSObs WHERE "Observation Date" > '2017-06-30

Hi,

You have given it a SELECT clause rather than a WHERE clause. You can just use "Observation Date" > '2017-06-30'

Just remove the "Select * from Aconex.vEnablonBBSObs where" and you will be away.

 

Cheers,

Todd

 

That is why you are getting this as the select query in the log:

 

SELECT CBBSId], ]ID], ]Entity/Observation], ]Observation Date], ]Observation Type], ]Severity of Observation], ]Performed By], ]EmployeeID], ]Person Observed], ]CONT_SVC_PROVIDER], ]Not Listed], ]CONT_SVC_PROVIDER_Name], ]Name_Third_P_Inv], ]Group Type], ]Safe], ]At Risk], ]Description], ]Longitude], ]Latitude], ]Location], ]OrgAxisId], ]Reference], ]Workplace Activity], ]Offline_CONT_SVC_PROVIDER], ]Behaviours], ]Company], ]Platform], ]Created on], ]Created by], ]Last Modified on], ]Last Modified by], ]AtRisk Corrected], ]RelatedAction], ]OpenAction], ]Actions], ]Open Actions], ]Completed Actions], ]Overdue Actions], ]IsDeleted] FROM Aconex.evEnablonBBSObs] WHERE SELECT * FROM Aconex.vEnablonBBSObs WHERE "Observation Date" > '2017-06-30

Thank you Todd :)

 

cheers,

Rawan


Reply