Holidates in queries

Xcalibur

Registered User.
Local time
Yesterday, 21:55
Joined
Oct 3, 2004
Messages
22
I have two queries. One has an item field, a field for dates (date) and the other has a list of holiday dates (holidates). I have an if statement that compares the date to the holidates and tells it how many days to add to bring it to the next work day if it is a holiday. My problem is that it returns many lines for each item as it compares the date to each holidate. I can group them but that only works when they are all non holidays, I end up with two lines for the item that hits a holiday.

Is there another way to do this so it only returns one line for each item?

Thanks.

P.S. The queries are not joined and there is no way to join them as there are no common fields even through another query.
 
I have two queries. One has an item field, a field for dates (date) and the other has a list of holiday dates (holidates). I have an if statement that compares the date to the holidates and tells it how many days to add to bring it to the next work day if it is a holiday. My problem is that it returns many lines for each item as it compares the date to each holidate. I can group them but that only works when they are all non holidays, I end up with two lines for the item that hits a holiday.

Is there another way to do this so it only returns one line for each item?

Thanks.

P.S. The queries are not joined and there is no way to join them as there are no common fields even through another query.


I found the solution. All I had to do was enter MAX in the total line under date that causes it to only show the line with the highest date.
 

Users who are viewing this thread

Back
Top Bottom