Solved

crosstab to find the most recent and oldest dates?

Posted on 2012-03-26
3
360 Views
Last Modified: 2012-03-26
Hi,

I have a table like this.
authort(authorid, surname,givenname)
publicationT(publid, title, pubdate)
association(pubid, authorid)

I am trying to use the crosstab to find this
row: Authorid,
column: #of publication, earliest date (of publication),oldest date(of publication)

I am having alittle trouble with find the earliest and oldest.
Can I just use  FIRST and LAST?
I tried it but it errors out.
0
Comment
Question by:dkim18
3 Comments
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 50 total points
ID: 37765911
better upload a copy of the db..
0
 
LVL 77

Accepted Solution

by:
peter57r earned 450 total points
ID: 37765924
You wouldn't use a crosstab for this.

Using the query design grid Just create a query that lists the authorid, title, and the publication date twice.
Convert this to a totals query by clicking the Totals button .
Change the GroupBy in Title to Count, the groupby in the pubdate columns to max and min.
0
 

Author Closing Comment

by:dkim18
ID: 37766151
You are right.<br />I don't need the crosstab.<br /><br />Thanks.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 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

14 Experts available now in Live!

Get 1:1 Help Now