Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinDallas
Specialist III
Specialist III

QS-Set Transaction Level + !EXECUTE_NON_SELECT_QUERY keyword

Hello Folks,

 

I'm on QS May 2023 Patch 11 and I'm doing a disaster recovery restore.

When I run a similar query as below:

 

SQL SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT 
lc.cty_name AS 'leg_start_city', 
...
FROM legheader l 
INNER JOIN city lc ON lc.cty_code = l.lgh_startcity
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
;

 

I am greeted with the following error:

The following error occurred:
Unable to get column information for the fields that are used in the query. Please make sure that SQL statement used produces a result set or use !EXECUTE_NON_SELECT_QUERY keyword.
The error occurred here:
SQL SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

 

This was not a problem in original system that had an accident.  The only thing I can think of that might be different is that the old system might have used an ODBC connector but it's gone so I can't tell.

 

How can I run transaction level statements?

 

Any help is greatly appreciated.

Labels (5)
1 Solution

Accepted Solutions
JustinDallas
Specialist III
Specialist III
Author

Turns out I needed to be using the ODBC connector and not he general Microsoft SQL Server connector.

View solution in original post

2 Replies
Anil_Babu_Samineni

By seeing first glance, It is pointing to your Non select query. Maybe try like this. If you already trying from PgAdmin, you don't need SQL in the front.

 

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED !EXECUTE_NON_SELECT_QUERY;
SELECT
lc.cty_name AS 'leg_start_city',
...
FROM legheader l
INNER JOIN city lc ON lc.cty_code = l.lgh_startcity
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
JustinDallas
Specialist III
Specialist III
Author

Turns out I needed to be using the ODBC connector and not he general Microsoft SQL Server connector.