TM1 SQL
-
- Regular Participant
- Posts: 269
- Joined: Tue Apr 21, 2009 3:43 am
- OLAP Product: Cognos TM1, Planning
- Version: 9.1 SP3 9.4 MR1 FP1 9.5
- Excel Version: 2003
TM1 SQL
Is all applicable SQL query statement or script applicable for TI? Since I'm currently using TOAD but when I sometimes use working SQL script on TI it doesnt show any values but on TOAD it does?
-
- Site Admin
- Posts: 6644
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: TM1 SQL
Ah, TOAD... I remember TOAD. Haven't used it for years, but then I haven't used an Oracle database for years.appleglaze28 wrote:Is all applicable SQL query statement or script applicable for TI? Since I'm currently using TOAD but when I sometimes use working SQL script on TI it doesnt show any values but on TOAD it does?
See the following thread:
http://forums.olapforums.com/viewtopic. ... 957&p=5406
In short, TI doesn't do anything with SQL statements aside from pass them to the database. It doesn't interpret them, it doesn't process them. It simply says to the DBMS "here's the query, now give me the rows". If you're getting rows returned in TOAD but not in TI, and you're using EXACTLY the same syntax (an important qualification, particularly if parameters are involved), then my suspicion is that the issue is with your ODBC connection to the Oracle database, not with TI as such.
You should be absolutely certain that you're using the same login and password in both environments. If you're using different ones, it's possible that the login that you're using on TOAD has permissions to tables or views that the login that you're using for TI's ODBC connection doesn't.
Also check that the ODBC data driver is current; as I recall, ODBC connections to Oracle databases are considerably more "fussy" than connections to Access, SQL Server, etc.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
- Michel Zijlema
- Site Admin
- Posts: 712
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: TM1 SQL
Hi,
As Alan mentioned TI just passes the query to the database and retrieves the resultset. Some things to note: if (in the query window on the datasource tab) your SQL consists of multiple, semicolon separated, statements, I think TI will only pass the first one. Another thing: TI doesn't like double quotes - if you have literals in your query statement make sure that you use single quotes instead of double quotes.
Michel
As Alan mentioned TI just passes the query to the database and retrieves the resultset. Some things to note: if (in the query window on the datasource tab) your SQL consists of multiple, semicolon separated, statements, I think TI will only pass the first one. Another thing: TI doesn't like double quotes - if you have literals in your query statement make sure that you use single quotes instead of double quotes.
Michel
-
- Regular Participant
- Posts: 269
- Joined: Tue Apr 21, 2009 3:43 am
- OLAP Product: Cognos TM1, Planning
- Version: 9.1 SP3 9.4 MR1 FP1 9.5
- Excel Version: 2003
Re: TM1 SQL
I have some instances that the SQL I use in TOAD and TI are the same and I get a query result but at times there are query result but non for TI.
Sometimes I even use Native SQL produce by the Report Studio on TOAD, sometimes I have to re-edit it removing the table name or something in TI. Some work some doesn't
Sometimes I even use Native SQL produce by the Report Studio on TOAD, sometimes I have to re-edit it removing the table name or something in TI. Some work some doesn't
-
- Site Admin
- Posts: 6644
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: TM1 SQL
It's still not TI that's causing the issue unless it's one of the problems that Michel mentioned. TI is nothing more than a string passer, and data receiver.appleglaze28 wrote:I have some instances that the SQL I use in TOAD and TI are the same and I get a query result but at times there are query result but non for TI.
Sometimes I even use Native SQL produce by the Report Studio on TOAD, sometimes I have to re-edit it removing the table name or something in TI. Some work some doesn't
Assuming that it isn't one of the formatting issues that Michel mentioned isn't at play, I'll bet that you'd get exactly the same results as TI if you ran the query via MS Query as well. Which would again bring it back to login access and / or ODBC driver.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.