select statement

yessir

Saved By Grace
Local time
Today, 05:54
Joined
May 29, 2003
Messages
349
how can i say this?

SELECT
([Volunteer Info2].VolunteerID, *)

From


the problem is that the query won't recognize the VolunteerID from just the table listed above...

ie i used * but there are tables linked by the ID and it won't select the right one
 
SELECT [Volunteer Info2].VolunteerID From [Volunteer Info2]

Should dump all the values contained in a column called VolunteerID where that column is in a table named [Volunteer Info2]. It does not get much more simple than that. If that does not work, something else is amiss.
 
it's the report

the report doesn't know which table to get volunteerID from
 
in the query

i guess that the problem is in the query, although shouldn't be

:confused:
 
here's the code

SELECT [Volunteer Info2].VolunteerID, [Volunteer Info2].Name, [Volunteer Info].ComplimentaryAndTherapies, [Volunteer Info].FrontDeskCoordinator, [Volunteer Info].ReceptionFrontDesk, [Volunteer Info].ReceptionAnonTesting, [Volunteer Info].PreEventSupport, [Volunteer Info].EventSupport, [Volunteer Info].Advocacy, [Volunteer Info].AfterEventSupport, [Volunteer Info].ACNSBoard, [Volunteer Info].ProgramPlannigAndEvaluation, [Volunteer Info Hours].JobPlacement
FROM ([Volunteer Info2] INNER JOIN [Volunteer Info] ON [Volunteer Info2].VolunteerID = [Volunteer Info].VolunteerID) INNER JOIN [Volunteer Info Hours] ON [Volunteer Info2].VolunteerID = [Volunteer Info Hours].VolunteerID
WHERE ((([Volunteer Info2].VolunteerID) Like '*1*'));
 
You have no data in Volunteer Info Hours nor in Volunteer Info yet you are doing an INNER JOIN on these tables, so they will not return any rows. You either need to add data (with a matching volunteerID, in this case 1) to the other tables, or change the joins to outer joins.
SELECT [Volunteer Info2].VolunteerID, [Volunteer Info2].Name, [Volunteer Info].ComplimentaryAndTherapies, [Volunteer Info].FrontDeskCoordinator, [Volunteer Info].ReceptionFrontDesk, [Volunteer Info].ReceptionAnonTesting, [Volunteer Info].PreEventSupport, [Volunteer Info].EventSupport, [Volunteer Info].Advocacy, [Volunteer Info].AfterEventSupport, [Volunteer Info].ACNSBoard, [Volunteer Info].ProgramPlannigAndEvaluation, [Volunteer Info Hours].JobPlacement
FROM ([Volunteer Info2] LEFT JOIN [Volunteer Info] ON [Volunteer Info2].VolunteerID = [Volunteer Info].VolunteerID) LEFT JOIN [Volunteer Info Hours] ON [Volunteer Info2].VolunteerID = [Volunteer Info Hours].VolunteerID
WHERE ((([Volunteer Info2].VolunteerID) Like '*1*'));
 
I havent looked at your DB but...

VolunteerID... ID says to me its numberic and your doing Like '*1*'

It will work but its not the most plesent way of dealing with a numberic value.....

Regards

The Mailman
 

Users who are viewing this thread

Back
Top Bottom