Solved

How to add additional database columns to the Cognos Model's Query Subject.

Posted on 2011-09-13
8
945 Views
Last Modified: 2013-12-25
Hi,

I've published the model and packages already.  But I need to add more database columns to the existing Query Subject.

I tried using the ..Run Metadata Wizard, but it's creating another object itself by adding these new columns, instead of adding to the existing object.

Any help would be appreciated.

Thanks
0
Comment
Question by:kris norman
  • 3
  • 3
8 Comments
 
LVL 8

Expert Comment

by:SNeupane
ID: 36530752
Right click on the query subject and create a 'Query Item', then edit the expression to what you need.
0
 

Author Comment

by:kris norman
ID: 36530990
But it throwing an error. Because the column I'm referring doesn't exist in the Query Subject yet.

QE-DEF-0030 Expression parsing error.
QE-DEF-0359 The query contains a reference to at least one object '[dbo].[tbl_PO_Facts_POReceipts].[POLineRef]' that does not exist.
0
 
LVL 8

Accepted Solution

by:
SNeupane earned 500 total points
ID: 36531312
I see.
1st of all, cognos best practice suggests that you bring everything from database in your source view and then create business view from the source by selecting only what is needed.
In your case, double click on the query subject you want to add a column, then expand database tables and drag the column what you want to bring in.
Click OK and you'll see the new columns.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Assisted Solution

by:kris norman
kris norman earned 0 total points
ID: 36531566
It's silly one.  I removed the Select * from table in the Query Subject Definition and re-wrote the same query. It works.  

Always, thanks for your help
0
 

Author Comment

by:kris norman
ID: 36531670
I've requested that this question be closed as follows:

Accepted answer: 0 points for nooka8's comment http:/Q_27305807.html#36531566

for the following reason:

It worked
0
 
LVL 8

Expert Comment

by:SNeupane
ID: 36531671
So my 36531312suggestion helped.
May be 'assisted'?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question