sql help

M

Matt Shudy

Hi,

I have a page where I am trying to display a list of
locations that do not have any data enterend for them...
I am using two tables in access for this. One has a
complete list of the possible locations (table name:
locations)and the other has the contains the location,
month, year, and other data (table name: actual). I need
a sql statement that selects all the rows of data in the
actual table based on the selected month and year, then
find the missing locations. This is the sql statement
that i have been trying to manipulate.

strSQL = "SELECT Locations.Location FROM Locations LEFT
JOIN Actual ON Locations.Location WHERE
(((Actual.Location) Is Null));"

and I need to add something into the where clause that
will select only the user selected month and year, which i
store in Session("MonthValue") and Session("YearValue")

Thank you,

Matt Shudy
 
M

Mike

strSQL = "SELECT Locations.Location
FROM Locations LEFT JOIN Actual ON Locations.Location
WHERE (((Actual.Location) Is Null)) and
Month = '::MonthValue::' and Year = '::YearValue::'
 

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