Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Turns out I needed to be using the ODBC connector and not he general Microsoft SQL Server connector.
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;
Turns out I needed to be using the ODBC connector and not he general Microsoft SQL Server connector.