TI process odbc SQL issue

Post Reply
MarenC
Regular Participant
Posts: 438
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

TI process odbc SQL issue

Post by MarenC »

Hi all,

I have a TI process which uses an ODBC data source.

The SQL is constructed on the prolog.

If I use the following code in the Where Clause the process runs fine in a few seconds without any issues:

Code: Select all

'AND  [ElementName] = ' | CHAR(39) | 'Pension Salary Sacrifice' | CHAR(39) | ' ' |
However, if I tweak the sql above as follows to include another element, the process appears to run into an endless loop (maybe eventually it would run but who knows!) , or it never manages to get off the prolog:

Code: Select all

'AND ([ElementName] = ' | CHAR(39) | 'Pension Salary Sacrifice' | CHAR(39) | ' or ' | '[ElementName] = ' | CHAR(39) | 'Pen Adj +' | CHAR(39) | ') ' |
I also tried using the sql In operator but the result was the same endless loop.

It should be noted that when running the query in sql server the same code runs in around 33 seconds.

Has anyone seen this issue before, it feels like a bug to me?

Maren
MarenC
Regular Participant
Posts: 438
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: TI process odbc SQL issue

Post by MarenC »

Hi,

I think I have sorted this by adding "'SET NOCOUNT ON;" to the SQL query.

Maren
Post Reply