Skip to main content
Solved

the reader seems to cache sql queries in the where clause. Hi I've got two readers - one had a sql query that may have had a bug in it and a new one that never had sql in it

  • August 31, 2020
  • 1 reply
  • 11 views

Hi,

so there may have been a bug in my SQL (I'm not convinced) I tried to fix it and it still didn't work then I cleared the sql in the Where clause and it still reported a error.

 

I then created a new sql reader from the same DB connection and got an error.

 

next I replaced the DB connection. the older reader that had the sql in the where clause still reported an error.

 

the newer reader that never had sql in the where clause works. both report that they are using the DBconnection 'GISDW_test.

 

the older one has the error:

Microsoft SQL Server Non-Spatial Reader: Query failed, possibly due to a malformed statement. Query Text `SELECT [mirn], [year], [state], [readingType], [maxFlow], [janDays], [jan], [febDays], [feb], [marDays], [mar], [aprDays], [apr], [mayDays], [may], [junDays], [jun], [julDays], [jul], [augDays], [aug], [sepDays], [sep], [octDays], [oct], [novDays], [nov], [decDays], [dec], [slope], [intercept], [r2], [count], [regressionComment], [qualityFlag] FROM Synergi.[MIRN_YEAR_REGRESSION_test] WHERE FME_SQL_DELIMITER ;

SELECT * FROM Synergi.[MIRN_YEAR_REGRESSION_test] WHERE [year] = 2019 and [state] = 'VIC';

'. Provider error `(-2147217900) An expression of non-boolean type specified in a context where a condition is expected, near ';'.'

 

but there is not code in the where clause.

Whats going on?

cheers

Best answer by ldonofrio

I've found that a normal reader has this error but if I use a sqlCreator I can get the results I need.

cheers

View original
Did this help you find an answer to your question?

1 reply

  • Author
  • Best Answer
  • August 31, 2020

I've found that a normal reader has this error but if I use a sqlCreator I can get the results I need.

cheers


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings