Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Gognos : How to select latest date

Posted on 2013-12-21
2
Medium Priority
?
403 Views
Last Modified: 2013-12-23
Hi All,

I generated a report to show customers outstanding balance with date. The issue that report is duplicating each customer showing multiable date and i found that latest date is the correct.

How can I filter date table to show only latest date only?

Thank you.
0
Comment
Question by:amq10
2 Comments
 
LVL 6

Accepted Solution

by:
ButlerTechnology earned 2000 total points
ID: 39734488
A sub-query in the where clause using the MAX function will allow you to get the last date.
Here's an example:
 Select * 
from Customer C inner join Purchase P
         on c.CustomerID = p.CustomerID
where p.PurchaseDate = (Select max(Purchasedate) from Purchase where CustomerID = c.CustomerID)

Open in new window


Tom
0
 

Author Closing Comment

by:amq10
ID: 39736414
it works, thank you
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

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

886 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