?
Solved

Business Objects Query

Posted on 2013-06-06
6
Medium Priority
?
371 Views
Last Modified: 2013-07-15
I am using BI4 and need some help with a business objects query. the query works fine except for returning all dates. The query has an effective date field and I dont want every date for each person just the latest date.
0
Comment
Question by:CMILLER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 39226531
select * from
(select t.*,row_number() over(partition by person order by effective_date desc) rn
from your_table t)
where rn = 1
0
 

Author Comment

by:CMILLER
ID: 39226561
How do I add that into BI4? See the attached.
BI4-QUERY.JPG
BI4-QUERY-1.JPG
0
 

Author Comment

by:CMILLER
ID: 39226586
Also, what do I need to replace to get it to work.

select * from
(select t.*,row_number() over(partition by person order by effective_date desc) rn
from your_table t)
where rn = 1
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 39226607
create a view in your database that looks like that query except change the table and column names to whatever is appropriate for your real source table.

Then add that view to your universe and query it as if it were the original table  The only difference will be you'll have an extra "rn" column you might want to ignore.  You could remove that from the view though by specifying the columns instead of *
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 39226612
or, if you don't have the option of putting that in the database, you could create a derived table within the universe much the same way and then use the derived table instead of the original source table
0
 

Author Comment

by:CMILLER
ID: 39242145
ok, I will try that. Thanks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

765 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