Between Statement help

Hey guys, i need help on a certain query.

in my database i have two tables which has some fields. I'm only naming the ones that are important for the query.

both tables dont have a primary key. I already tried making one but i just can't normalize it if it does have one. so i pretty much have set my self to ignore the primary key. now because of that, i cant make the two tables related. such a drag isnt it? anyway... here are the specific fields in each table that needs importance.

Table 1. Service, Total, Date
Table 2. Class, Total, Date

Service and class are the core of the query. they are the particular names of the activity per record.

Both the totals are.. well.. totals. They are the total amount of attendance for a specific activity.

The date... well the date says it all. and it is the thing that i use in this query...

now what i want to do is.. query every record in both tables that has the dates [i'm going to make it parameterized(user defined) later] that are between two user defined dates. for example..

i want every record on the two tables that was held on dates between 08/12/2009 and 09/12/2009 inclusive

it's pretty much of a problem due to its non-relativity.

and it's just on the first part of it.

because the thing i really want here is, to average all the totals that are inside the user-defined dates.



by the way. i use MSAcces as database and VB6 as a front end.

Im doing this project for a certain client. thanks for the help.. i'm really not very good with generating SQL statements in my mind. so help is greatly appreciated. :)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories