Solved

Gognos : How to select latest date

Posted on 2013-12-21
2
372 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

948 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now