Hi,
If you are looking at Generated SQL of the query, you will not see the where clauses by default. You can change the Use SQL Parameters property in query properties that can show the where clauses as well as parameterized variables.
Regards
------------------------------
Kiran Passumarthi
www.linkedin.com/in/kiranpassumarthi------------------------------
Original Message:
Sent: Thu July 23, 2020 12:05 AM
From: HENK CAZEMIER
Subject: Strange Generated Query Results
Hi Jerome,
Ah, its a filter expression in Reporting that you're dealing with.
The filter doesn't get pushed to the Native SQL if one of the terms is not supported.
Is the query subject [Customer Info] in the FM model defined on PassThroughSQL ?
What is the technical datatype of the field? I suspect it is a CHAR(10) field.
Cognos adds the trim and cast functions. One of those is not supported by the underlying data provider (at least that is what Cognos thinks).
What happens when you change the expression to:
rtrim ( cast ( ffff, varchar(10) ) ) = '1234' does that show up in the native sql ?
// Henk
------------------------------
HENK CAZEMIER
------------------------------
Original Message:
Sent: Wed July 22, 2020 02:46 PM
From: jerome roberts
Subject: Strange Generated Query Results
Hi Henk,
I made one mistake in my post. The table column referenced in the comparison is indexed. But it changes nothing.
The answers to your questions.
What database technology are you building this on?
Sybase ASE 16
Are the tables in the same data source ?
YES
If the tables are in different sources, then the join is performed in the Cognos software and would not show up in Native SQL.
NO JOIN.
Here are some screen shots.
The filter expression with the – comparison.

Notice the Native vs IBM generated SQL.


IBM Cognos SQL version has correct 'where' condition, Native version is incorrect, although that is the default version.
Original Message:
Sent: 7/22/2020 1:06:00 PM
From: HENK CAZEMIER
Subject: RE: Strange Generated Query Results
Hi Jerome,
What database technology are you building this on? Are the tables in the same data source ? If the tables are in different sources, then the join is performed in the Cognos software and would not show up in Native SQL.
If you want we can do a webex and I can have a look with you.
PM me at henk.cazemier@ca.ibm.com
// Henk
------------------------------
HENK CAZEMIER