SQl Server I need to fix the "Timed out" error. Expired Pending

I know that he was asked several times, but I can’t understand what corrections I read to solve my problem. I get a SQL Server error that "the timeout period expires before the operation is completed or the server is not responding." I changed the setting in Tools> Options> Designers> Override Connection String Time to 120 seconds accordingly, but ... it still doesn't work after 30 seconds. I access the database from visual studio, working directly with it, and not with ado in the client code. I am open to suggestions ... here is the btw request:

SELECT Symbol FROM tblSymbolsMain WHERE ((SELECT dbo.LatestDateInDailyPricingVolBySymbol(tblSymbolsMain.Symbol) AS Expr1) < dbo.RecentTradingDateByNumber(5))

In short, the goal is to return all stock symbols from the main symbol table that do not have a daily price data point in the price table for at least 5 trading days.

Thanks as always in advance.

0
source share
1 answer

The code does not display correctly ... you have ...WHERE (SELECT...) WHERE what?

Are you sure you are not after

SELECT MyCols FROM MyTable WHERE ID IN (...)

OR

SELECT MyCols FROM MyTable WHERE ID NOT IN (...)

Where (...) represents another choice returning some kind of identifier.

Otherwise, of course, you will get a timeout. This selection can return a counter, and WHERE 1 can go on and on ...

+1
source

All Articles