OLE DB provider "INSQL" for linked server “INSQL” returned message "History queries must contain at least one valid tagname" Msg 7320, Level 16, State 2, Line 2 Cannot execute the query *SELECT Tb11001. DateTime Col1004, Tbi1001. TagName Co11005, TbI1001. Value Col1006, Tb11001. value Col1007, Tb11001. Quality Col1008, Tb1001. QualityDetail Col1009, Tb11001. OPCQuality Col1010, Tb11001. wwagKey Coll011, Tb11001. wRowCount Col1012, TbI1001. wResolution Coll013, Tb11001. wEdgeDetection Col1014, TbI1001. wRetrievalMode Col1015, Tb11001. wTimeDeadband Coll016, Tb11001. wwWalueDeadband Col1017, Tb11001. wwTimeZone Col1018. Tb11001. wwersion Col1019, Tb11001. wwCycleCount Co11020, TbI1001. wwTimeStampRule Col1021, Tb11001. wwInterpolationType Col1022, Tb11001. wQual i tyRule Col1023, Tb11001. wwStateCal c Col1024, Tb11001, StateTime Col1025, Tb11001. PercentGood Col1026, Tbl1001. wwParameters Col1027, Tb11001. StartDateTime Col1028,Tb11001. SourceTag Col1029, Tb 1901. SourceServer Coll030, TbI1001, wuFilter Col1031, Tbl1001. wValueSelector Coll032, Tb11001. wwaxStates Col1003 FROM Runtime. dbo. History Tb11001 against OLE DB provider "INSQL” for linked server “INSQL”.如何解决
时间: 2024-03-31 21:36:46 浏览: 285
要解决这个问题,你需要在查询中指定至少一个有效的标记名称。在查询中添加一个有效的标记名称,例如:
SELECT Tb11001.DateTime Col1004, Tbi1001.TagName Co11005, TbI1001.Value Col1006, Tb11001.value Col1007, Tb11001.Quality Col1008, Tb1001.QualityDetail Col1009, Tb11001.OPCQuality Col1010, Tb11001.wwagKey Coll011, Tb11001.wRowCount Col1012, TbI1001.wResolution Coll013, Tb11001.wEdgeDetection Col1014, TbI1001.wRetrievalMode Col1015, Tb11001.wTimeDeadband Coll016, Tb11001.wwWalueDeadband Col1017, Tb11001.wwTimeZone Col1018. Tb11001.wwersion Col1019, Tb11001.wwCycleCount Co11020, TbI1001.wwTimeStampRule Col1021, Tb11001.wwInterpolationType Col1022, Tb11001.wQual i tyRule Col1023, Tb11001.wwStateCal c Col1024, Tb11001.StateTime Col1025, Tb11001.PercentGood Col1026, Tbl1001.wwParameters Col1027, Tb11001.StartDateTime Col1028,Tb11001.SourceTag Col1029, Tb 1901.SourceServer Coll030, TbI1001.wuFilter Col1031, Tbl1001.wValueSelector Coll032, Tb11001.wwaxStates Col1003 FROM Runtime.dbo.History Tb11001 WHERE Tb11001.TagName='valid_tagname' against OLE DB provider "INSQL” for linked server “INSQL”。
请将“valid_tagname”替换为你要查询的标记名称。这个查询将只返回指定标记名称的历史记录。
阅读全文