?
Solved

Business Objects Query

Posted on 2013-06-06
6
Medium Priority
?
374 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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to recover a database from a user managed backup
Suggested Courses

830 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