Solved

Gognos : How to select latest date

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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Count where two id types exist in column 8 30
Showing random records from database 10 46
SQL trigger 5 25
Where on a calculated field 1 23
Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

820 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