F
Frank Dulk
I have a table (Tab_Animal)com the following fields:
[cod_animal],[data] and [it fills up]
Every time that an animal lot seedling, should find out the fields of this
table.
I need to determine the entrance date and exit of an animal in the lots.
The consultation should have the following fields:
[cod_animal],[data_entrada],[data_saida] and [it fills up]
I made the following attempt:
SELECT [Tab_Animal].cod_Animal, [Tab_Animal].data AS data_entrada,
[Tab_Animal].data AS data_saida,[Tab_Animal].lote
FROM [Tab_Animal]
WHERE ((([Tab_Animal].data)=(Select(MIN(t.[data])) FROM [Tab_Animal] as t
WHERE ((t.[cod_Animal]=[Tab_Animal].[cod_Animal]) AND
((t.[data])>([Tab_Animal].[data]))))));
But the consultation comes back empty. Does anybody can me to help to find
where this the mistake?
[cod_animal],[data] and [it fills up]
Every time that an animal lot seedling, should find out the fields of this
table.
I need to determine the entrance date and exit of an animal in the lots.
The consultation should have the following fields:
[cod_animal],[data_entrada],[data_saida] and [it fills up]
I made the following attempt:
SELECT [Tab_Animal].cod_Animal, [Tab_Animal].data AS data_entrada,
[Tab_Animal].data AS data_saida,[Tab_Animal].lote
FROM [Tab_Animal]
WHERE ((([Tab_Animal].data)=(Select(MIN(t.[data])) FROM [Tab_Animal] as t
WHERE ((t.[cod_Animal]=[Tab_Animal].[cod_Animal]) AND
((t.[data])>([Tab_Animal].[data]))))));
But the consultation comes back empty. Does anybody can me to help to find
where this the mistake?