Skip to main content
Hi, all:

 

 

I have a huge MS SQL Server Non-spatial database,each record has a "datetime" time stamp. Now I'm using "SQLCreator" to read the data.

 

In the SQL Statement, I wrote:

 

 

SELECT * FROM mytable

 

WHERE  ID='1007'

 

AND YEAR(datetime)=2015

 

AND MONTH(datetime)=1

 

 

But I cannot get the data and FME say: MS SQL Server Reader: Query failed, possibly due to a malformed statement. Provider error `(-2147217871) Query timeout expired'

 

 

 

Does anyone know the reason?

 

 

Thanks in advance,

 

Ariel

 

 
I think myself find the method, I used Command Timeout as '9999999" but after change that to 300 seconds, it works. 🙂
Hi

 

 

You might want to verify that your fields ID and DATETIME have been properly indexed, it shouldn't take many seconds to run a query like this.

 

 

David
Hi, David:

 

 

Thanks, yes they are properly indexed. I got it running now. 

FME will set a timeout value by default. If you are encountering this error, you set the Command Timeout to 0 so there is no timeout.


Reply