2015-09-03 80 views
-1

當我嘗試通過單擊SQL按鈕在Spotfire的信息鏈接中編寫查詢時,我甚至能夠執行復雜的查詢。SPOTFIRE - 嘗試在信息鏈接中執行查詢時出錯

但是當我嘗試這個非常簡單的一個,它失敗

Select * from Table_name where Date_Value IS NOT NULL 

是否有人可以幫我一個解決方案。我試過Date_Value = ''但這並沒有給出正確的價值。我需要它null。

Error message: Could not open information link. 

TargetInvocationException at Spotfire.Dxp.Framework: 
Exception has been thrown by the target of an invocation. (HRESULT: 80131604) 

Stack Trace: 
at Spotfire.Dxp.Framework.ApplicationModel.ProgressService.ExecuteWithProgressCancelable(String title, String description, ProgressOperation operation, Boolean showCancelButton) 
at Spotfire.Dxp.Forms.Data.InformationDesigner.DesignerFormController.ExecuteInformationLink(CachedInformationLinkElement informationLink) 


ImportException at Spotfire.Dxp.Data: 
Failed to execute data source query. (HRESULT: 80131500) 

Stack Trace: 
    at Spotfire.Dxp.Data.DataSourceConnection.ExecuteQuery2() 
    at Spotfire.Dxp.Data.DataFlow.Execute() 
    at Spotfire.Dxp.Data.DataFlow.DataFlowConnection.ExecuteQueryCore2() 
    at Spotfire.Dxp.Data.DataSourceConnection.ExecuteQuery2() 
    at Spotfire.Dxp.Data.Producers.SourceColumnProducer.<>c__DisplayClass15.<GetColumnsAndProperties>b__12() 
    at Spotfire.Dxp.Framework.ApplicationModel.Progress.ExecuteSubtask(String title, ProgressOperation operation) 
    at Spotfire.Dxp.Data.Producers.SourceColumnProducer.GetColumnsAndProperties(DataSourceConnection connection) 
    at Spotfire.Dxp.Data.Persistence.DataItem.PerformUpdate(SourceColumnProducer producer, DataSourceConnection connection) 
at Spotfire.Dxp.Data.Persistence.DataItem.Update(SourceColumnProducer producer, DataSourceConnection connection) 
at Spotfire.Dxp.Data.Persistence.DataPool.<LoadData>d__2.MoveNext() 
at Spotfire.Dxp.Data.Producers.SourceColumnProducer.ConfigureAndLoadData() 
at Spotfire.Dxp.Framework.DocumentModel.Node.ConfigureSubTree() 
at Spotfire.Dxp.Framework.DocumentModel.Node.<ConfigureSubTree>b__13(Node node) 
at Spotfire.Dxp.Framework.DocumentModel.Node.ConfigureSubTree() 
at Spotfire.Dxp.Framework.DocumentModel.Node.<ConfigureSubTree>b__13(Node node) 
at Spotfire.Dxp.Framework.DocumentModel.Node.ConfigureSubTree() 
at Spotfire.Dxp.Framework.DocumentModel.Node.<ConfigureSubTree>b__13(Node node) 
at Spotfire.Dxp.Framework.DocumentModel.State.NodeState.ForEachChild(IDocumentNodeChild[] children, Action`1 action) 
at Spotfire.Dxp.Framework.DocumentModel.Node.ConfigureSubTree() 
at Spotfire.Dxp.Framework.ApplicationModel.Progress.ExecuteSubtask(String title, IndeterminateProgressFormatter progressFormatter, ProgressSpeedFormatter speedFormatter, ProgressOperation operation) 
at Spotfire.Dxp.Framework.DocumentModel.DocumentNode.ConfigureAndAttachFromNew() 
at Spotfire.Dxp.Framework.DocumentModel.DocumentNode.AttachSubTreeWhileExecuting(UndoableNode newOwner) 
at Spotfire.Dxp.Framework.DocumentModel.DocumentNode.AttachToUndoableNode(UndoableNode newOwner) 
at Spotfire.Dxp.Framework.DocumentModel.UndoableKeyedCollection`2.<>c__DisplayClass6.<Insert>b__5() 
at Spotfire.Dxp.Framework.DocumentModel.Node.Spotfire.Dxp.Framework.DocumentModel.INode.InternalTransaction(Executor executor) 
at Spotfire.Dxp.Framework.DocumentModel.UndoableKeyedCollection`2.Insert(Int32 index, TNode item) 
at Spotfire.Dxp.Data.DataTableCollection.<>c__DisplayClass20.<Add>b__1f() 
at Spotfire.Dxp.Framework.DocumentModel.Node.Spotfire.Dxp.Framework.DocumentModel.INode.InternalTransaction(Executor executor) 
at Spotfire.Dxp.Data.DataTableCollection.Add(String dataTableName, DataSource dataSource, Boolean autoCreateFilters, Boolean includeInAxisControls) 
at Spotfire.Dxp.Application.PartiallyOpenedDataSource.<LoadData>d__0.MoveNext() 
at Spotfire.Dxp.Application.AnalysisApplication.<OpenPartiallyOpenedDocument>d__34.MoveNext() 
at Spotfire.Dxp.Application.AnalysisApplication.<OpenDataSource>d__1b.MoveNext() 
at Spotfire.Dxp.Application.AnalysisApplication.ConsumeDataLoadPromptRequests(IEnumerable`1 prompts) 
at Spotfire.Dxp.Application.AnalysisApplication.Open(DataSource source, DocumentOpenSettings settings) 
at Spotfire.Dxp.Forms.Data.Import.DataSourceFactoryService.OpenDataSourceWithoutPrompting(DataSource dataSource, DocumentOpenSettings documentOpenSettings, IServiceProvider serviceProvider) 
at Spotfire.Dxp.Forms.Data.Import.DataSourceFactoryService.OpenDataSource(InformationLinkDataSource dataSource, DocumentOpenSettings documentOpenSettings, IServiceProvider serviceProvider) 
at Spotfire.Dxp.Forms.Data.InformationDesigner.DesignerFormController.<>c__DisplayClass2.<ExecuteInformationLink>b__0() 
at Spotfire.Dxp.Forms.Application.FormsProgressService.ProgressThread.DoOperationLoop() 


InformationModelException at Spotfire.Dxp.Data: 
Failed to execute query: [tibcosoftwareinc][SQLServer JDBC Driver][SQLServer]Incorrect syntax near ''. (HRESULT: 80131500) 

Stack Trace: 
at Spotfire.Dxp.Data.InformationModel.InternalInformationModelManager.DataStream.GetNextBlock() 
at Spotfire.Dxp.Data.InformationModel.InternalInformationModelManager.DataStream.Read(Byte[] buffer, Int32 offset, Int32 count) 
at Spotfire.Dxp.Internal.Utilities.SeekableStream.Read(Byte[] buffer, Int32 offset, Int32 count) 
at System.IO.BinaryReader.FillBuffer(Int32 numBytes) 
at System.IO.BinaryReader.ReadUInt16() 
at Spotfire.Dxp.Data.Formats.Sbdf.SbdfSectionHeader.ReadSectionType(BinaryReader reader, SbdfSectionTypeId expectedType) 
at Spotfire.Dxp.Data.Import.SbdfDataRowReader.DelayedInit() 
at Spotfire.Dxp.Data.Import.InformationLinkDataSourceConnection.ExecuteQueryCore2() 
at Spotfire.Dxp.Data.DataSourceConnection.ExecuteQuery2() 


InformationModelServiceException at Spotfire.Dxp.Services: 
Failed to execute query: [tibcosoftwareinc][SQLServer JDBC Driver][SQLServer]Incorrect syntax near ''. (HRESULT: 80131509) 

Stack Trace: 
at Spotfire.Dxp.Services.WebServiceBase`1.InvokeService[T](ServiceMethod`1 serviceMethod, ExceptionFactoryMethod exceptionFactoryMethod) 
at Spotfire.Dxp.Data.InformationModel.InternalInformationModelManager.DataStream.GetNextBlock() 
+0

請更新您的問題,包括錯誤。 – niko

+0

Hi Niko,由於我無法發佈完整的錯誤信息,請找到它說轉換失敗的部分 - Spotfire.Dxp.Data上的InformationModelException: 無法獲取數據:[tibcosoftwareinc] [SQLServer JDBC驅動程序]不支持的數據轉換。 (HRESULT:80131500) –

+0

您應該能夠在問題中包含完整的錯誤。請點擊「spotfire」標籤下的「編輯」鏈接並更新它。我對這個問題可能有所瞭解,但我不想提供不正確的信息。 – niko

回答

0

OK,這將會是更有幫助,如果你可以更新答案執行SELECT * FROM table WHERE date_value IS NULL當您收到錯誤 - 現在你都呈現SELECT * FROM table WHERE date_value = ''我認爲這是正確的錯誤,因爲''不日期類型。

,但根據您的意見,它看起來像您正在使用的SQL服務器收到錯誤(直接數據)驅動程序是Unsupported data conversion.根據some resources I found,這是在JDBC驅動程序,而不是使用Spotfire了潛在的錯誤。您可以通過在另一個應用程序中使用該驅動程序並執行相同的查詢或更改驅動程序來驗證是否屬於這種情況。

對於後者,請按照TIBCO Spotfire Server Installation and Configuration手冊「安裝數據庫驅動程序」中的第29頁上的說明進行操作。正如在那裏提到的那樣,無論如何,從DD供應商驅動程序中你都會獲得更好的性能。

如果這樣做的話,如果您可以請回來更新您的原始問題並輸入與... IS NULL查詢有關的錯誤,以便其他人能夠更輕鬆地找到解決方案,那將是非常好的。

+0

感謝Niko提供的所有幫助。既然這是一個迫切的要求,我就創建一個視圖,然後在spotfire中調用視圖。一旦完成關鍵要求,我會更詳細地研究您的解決方案。再次感謝! –

+0

沒問題。我沒有提到的一個解決方案是按原樣導入數據,然後使用Spotfire的篩選器篩選出「(空)」值。 – niko