long and complicated query...

Eliot

New member
Local time
Today, 07:16
Joined
Dec 18, 2007
Messages
8
Hello all!

I find it difficult to build a query...

The scenerario is the following:
I have a table that keeps information for weeks about some files (e.g: if the file has been sent). Then I have another table with information for days in a month (the data for every day).

What I should do is:
Check wheter the week has been sent, if it has been sent, I have to show the data for every day of that week in a report. Only for one month... and I can't figure out how to build that query...

I guess I should do something like:
select week from weekTable where week=week and sent=TRUE
set rcset=db.openrecordset(sql)
if(not rcset.eof)then
'build in here the query to select the data I need from the month table
end if

but i can't figure out how the loop would be for 1 month...

Any help will be much appreciated!
 
if you have a date in your table you can do

BETWEEN (the first of the month) AND (the last of the month)

as the criteria
 
I have a table that keeps information for weeks about some files (e.g: if the file has been sent). Then I have another table with information for days in a month (the data for every day).

What I should do is:
Check wheter the week has been sent, if it has been sent, I have to show the data for every day of that week in a report. Only for one month
Eliot, this tells me that the data is a bit out of the realm of normalization. I would say that best thing to do here is either post a file for people to look at, or maybe just a screenshot of the layout for the two tables involved here (to get a clear picture).
 

Users who are viewing this thread

Back
Top Bottom