SQL Query in TI ODBC Connection

Post Reply
xtec2457
Posts: 3
Joined: Thu Aug 25, 2011 5:33 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2007
Location: Melbourne

SQL Query in TI ODBC Connection

Post by xtec2457 »

I have built an ODBC Connection to a SQL database to source actuals via TI process. I used TIMST to determine the previous month in the SQL table. It gives me the data I need and I can use Chore to run it automatically after work. It works properly but it just takes very long to finsih it as the TI reads every cell within the SQL table (as I use Select * From table in Query section in Data Source tab). Can I write a SQL query in Data Source tab to specify the year I take from the SQL table via ODBC thus reduce the size of the data to be linked to TM1 and increase the speed? If this option is doable, can anyone help me with the SQL query to select the current year? Do I make sense here? Thanks in advance for your help.
User avatar
Oratia623
Posts: 40
Joined: Mon Apr 27, 2009 5:36 am
OLAP Product: TM1/PA/CA
Version: V7.x to 2.0.9+
Excel Version: All
Location: Sydney, Australia

Re: SQL Query in TI ODBC Connection

Post by Oratia623 »

Hi,
Try the following syntax in the SQL:

Code: Select all

SELECT *
FROM tablename
WHERE fieldname = '?variablename?'
Where variablename is either a TI process parameter, or any other variable defined in the prolog tab (in your case via a TIMST function)
Paul Williamson
____________________________________________________________________________________
I came. I saw. I did not concur.
Post Reply