EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB484139: " Attempted to fetch an empty result.. " error appears when executing a FFSQL Report that calls a stored multi-statement stored procedure using JDBC connection


Yang Huang

Quality Engineer, Principal • MicroStrategy


This knowledge base article describes an issue that would occur when trying to execute a FFSQL Report that calls a stored multi-statement stored procedure using JDBC connection.

 SYMPTOM:
When executing a FFSQL that executes a stored multi-statement stored procedure using JDBC connection, error like “Error: QueryEngine encountered error: Fetch failed. Error type: Jdbc error. Jdbc operation attempted: Attempted to fetch an empty result..” would show up.

ka04W000000UL5iQAG_0EM2R000000oLHO.jpeg

Stored Procedure example:
create PROCEDURE Mulstats_input 
AS
create table #tmp (id int) 
insert into #tmp values (1)
select * from #tmp;
FFSQL report in developer:

ka04W000000UL5iQAG_0EM2R000000oLHT.jpeg

 
CAUSE:
It is a known limitation currently. In order to support this kind of stored procedure, we need another type of statement called CallableStatement, refer:https://docs.oracle.com/javase/tutorial/jdbc/basics/storedprocedures.html , which currently is not available in our product.
 
WORKAROUND:
1.    User can put the other statements in the report Pre/Post statement. For example:
 
There are 3 statements here:
Statement 1: create table #tmp (id int) 
Statement 2: insert into #tmp values (1)
Statement 3: select * from #tmp
We can put the first 2 statements in the Report Pre Statement1 and Report Pre Statement2 separately like following:

ka04W000000UL5iQAG_0EM2R000000oLHY.jpeg

Then put the 3rd statement (which would return results) in the report editor:

ka04W000000UL5iQAG_0EM2R000000oLHd.jpeg

2.    Or User can switch to ODBC connection. This issue would naturally go. 
 


Comment

0 comments

Details

Knowledge Article

Published:

March 25, 2020

Last Updated:

March 25, 2020