Author Topic: UNIOn Query to Find Records w/ Maximum  (Read 551 times)

Offline MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 9,864
  • Forum Citizenship: +597/-9
  • Cognos Software Muppet
Re: UNIOn Query to Find Records w/ Maximum
« Reply #15 on: 13 Nov 2017 11:08:18 am »
MFGF and Michael75 - I received a reply from our App's Vendor ...

This means our current use of Data Modules will be unable to include Packages.

The previous method we used will continue to work, but requires maintenance.

We will be fine.

I am not sure that, given the current restriction, we won't be able to add "other" dummy Fields
to have matching number of Fields for a UNION query.

THANK you both for showing me methods of accomplishing this, Bob

Assuming your package is based on relational tables in a database, couldn't you just include those tables in your data module as an alternative to using the package?

MF.
Meep!

Offline Cognos_Jan2017

  • Community Leader
  • *****
  • Join Date: Jan 2017
  • Posts: 235
  • Forum Citizenship: +0/-0
Re: UNIOn Query to Find Records w/ Maximum
« Reply #16 on: 13 Nov 2017 01:07:02 pm »
The Package IS relational data.

As for including the Tables ... the two Excel files
(carefully matched for a UNION) have actual data.

To ensure always seeing actual data, don't I need to
have that data from the Package ... like it is when I make the
Excel files from Cognos Reports?

Offline MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 9,864
  • Forum Citizenship: +597/-9
  • Cognos Software Muppet
Re: UNIOn Query to Find Records w/ Maximum
« Reply #17 on: 14 Nov 2017 01:48:43 am »
The Package IS relational data.

No it isn't. It's an XML definition that describes relational data. It is metadata - ie it isn't the data itself. The relational data the package describes lives in tables in the database. I was suggesting that if the package doesn't work for you in your data module, maybe linking directly to the underlying tables will?

As for including the Tables ... the two Excel files
(carefully matched for a UNION) have actual data.

To ensure always seeing actual data, don't I need to
have that data from the Package ... like it is when I make the
Excel files from Cognos Reports?

As above, the package doesn't contain data. It simply describes the data that lives in tables in the database, and presents it in (hopefully) intuitive form. When you use a query item from a package, Cognos resolves this to a column in a database and sends a SQL query to the database to retrieve it.

If the package isn't working for you in this case, you could perhaps point your data module at the database tables the package describes?

Cheers!

MF.
Meep!

Offline Cognos_Jan2017

  • Community Leader
  • *****
  • Join Date: Jan 2017
  • Posts: 235
  • Forum Citizenship: +0/-0
Re: UNIOn Query to Find Records w/ Maximum
« Reply #18 on: 14 Nov 2017 10:36:37 am »
Quote
No it isn't. It's an XML definition that describes relational data. It is metadata - ie it isn't the data itself. The relational data the package describes lives in tables in the database. I was suggesting that if the package doesn't work for you in your data module, maybe linking directly to the underlying tables will?

I am not sure the App Vendor will let us link to those SQL Server Tables?
I have no "Control" over the App's Framework Manager, and thus its Packages.

What do I ask the Vendor, specifically, on how to "Link" to those Tables so I can "feed"
the Query design you kindly sent last week?  The Vendor said our Package/ Data is
NOT available to utilize in a Data Module.

IF we try the required UNION, I guess we could get those Data Items from a direct Link?
Then write the needed queries of 4 Data Items each, and UNION those.

Listening to learn.  Thank you MFGF, Bob

Offline Cognos_Jan2017

  • Community Leader
  • *****
  • Join Date: Jan 2017
  • Posts: 235
  • Forum Citizenship: +0/-0
Re: UNIOn Query to Find Records w/ Maximum
« Reply #19 on: 16 Nov 2017 12:59:33 pm »
I have listed this in the App Vendor's Cognos discussion group ...  no reply yet.

 In a Cognoise discussion, it was suggested ... Bob again --> Is there a way to point my Data Module at the database tables the package describes? If so, we might be able to write a UNION query of 4 Fields, fed by 2 other queries of 10, and 6, Fields respectively ... BELOW is Cognoise suggestion. TIA, Bob
As above, the package doesn't contain data. It simply describes the data that lives in tables in the database, and presents it in (hopefully) intuitive form. When you use a query item from a package, Cognos resolves this to a column in a database and sends a SQL query to the database to retrieve it.

If the package isn't working for you in this case, you could perhaps point your data module at the database tables the package describes?

 


       
Twittear