問題描述
我知道有人問過很多次,但我似乎無法獲得已閱讀的修復程序來解決我的問題.我收到 SQL Server 錯誤,提示操作完成之前超時時間已過,或者服務器沒有響應."根據 選項>設計器>覆蓋連接字符串超時值"下的設置更改為 120 秒the-timeout-for-a-manually-executed-query-in-sql-server">this 發布,但是......它仍然在 30 秒后超時.我正在從 Visual Studio 訪問數據庫,直接使用它,而不是在客戶端代碼中使用 ado.我愿意接受建議......這是查詢順便說一句:
I know it's been asked a bunch of times but I can't seem to get the fixes I've read to solve my issue. I'm getting the SQL Server error that "the timeout period elapsed prior to completion of the operation or the server is not responding." I changed the setting under Tools>Options>Designers>"Override connection string time- out value" to 120 seconds as per this posting, but... it still times out after 30 seconds. I'm accessing the database from visual studio, working directly with it, and not with ado in client code. I'm open to suggestions... here's the query btw:
<代碼>選擇象征從tblSymbolsMain在哪里((SELECT dbo.LatestDateInDailyPricingVolBySymbol(tblSymbolsMain.Symbol) AS Expr1) < dbo.RecentTradingDateByNumber(5))
簡而言之,目標是返回主代碼表中的所有股票代碼,這些代碼表中至少有 5 個交易日沒有每日定價數據點.
In a nutshell, the goal is to return all stock symbols from a main symbols table that don't have a daily pricing data point in the pricing table for at least 5 trading days.
一如既往地提前致謝..
As always thanks in advance..
推薦答案
代碼似乎不正確...您有 ...WHERE (SELECT...)
什么地方?
The code doesnt appear to be correct ... you have ...WHERE (SELECT...)
WHERE what?
你確定你不是在追求
SELECT MyCols FROM MyTable WHERE ID IN (...)
或
SELECT MyCols FROM MyTable WHERE ID NOT IN (...)
其中 (...)
代表另一個返回某種 ID 的選擇.
Where (...)
represents another select returning some sort of ID.
否則當然會超時.該選擇可能會返回一個計數,WHERE 1
可以繼續……
Otherwise of course you'd get a timeout. That select may return a count and WHERE 1
can go on and on and on...
這篇關于SQL Server 我需要修復“超時已過期"的錯誤.超時時間已過"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!