Frustrating Query Woes

D

Dan

Hello,
I'm using a select query to find the number of plant
tissues I had the last time I did maintenance work on each
experiment. It is a simple query that I have done many
times seekin other information on the "max date" but this
time it won't work... very frustrating.

It is grouping the numbers of tissue and giving me the max
date for each number of peices of tissue (eg max date for
each time I had 0 tissue, each time I had 11 tissue, each
time I had 5 tissue; for each experiment). I'm not too
sure how clear that is without going into a long explanation.

This is the SQL code:

SELECT GeneralExperimentInformation.ExperimentName,
TransferInformation.ExperimentName,
Max(TransferInformation.DateTransferred) AS
MaxOfDateTransferred, TransferInformation.NumberCallus
FROM GeneralExperimentInformation INNER JOIN
TransferInformation ON
GeneralExperimentInformation.ExperimentName =
TransferInformation.ExperimentName
GROUP BY GeneralExperimentInformation.ExperimentName,
TransferInformation.ExperimentName,
TransferInformation.NumberCallus;

I'm taking info from a parent table and a child table.
I've included the keys to both tables. When I remove the
field TransferInformation.NumberCallus the
MaxOfDateTransferred works fine.

This is a copy of some SQL code that works perfectly fine:

SELECT GeneralExperimentInformation.ExperimentName,
TransferInformation.ExperimentName,
Max(TransferInformation.DateTransferred) AS
MaxOfDateTransferred,
TransferInformation.ExplantsPerSelectionPlate
FROM GeneralExperimentInformation INNER JOIN
TransferInformation ON
GeneralExperimentInformation.ExperimentName =
TransferInformation.ExperimentName
GROUP BY GeneralExperimentInformation.ExperimentName,
TransferInformation.ExperimentName,
TransferInformation.ExplantsPerSelectionPlate;

I'm sure the solution is simple.
Thank you for the help.
Dan
 
S

Sirocco

When you say the query doesn't work, what do you mean? Is there an error
message? Do you get results but the results are wrong? Is there a
particular number that's wrong, or all of them?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top