> What's the deal with ( tblEmployee.EmployeeID IS NOT NULL ) ?

> Shouldn't your ON clause be relating one row in one table
> to a row in another table?

It depends on what you're trying to accomplish with the query -- and it
turns out it doesn't work for him I _think_ because he's using Access ...
I've done this in MS SQL Server before -- rarely ... What it does is return
a cartesian result set, where there is no explicit relationship between the
two tables... so instead of getting

SERVICE EMPLOYEE
web             peter
support         paul
support         mary

.. you get...

COMPANY EMPLOYEE
web             peter
web             paul
web             mary
support         peter
support         paul
support         mary

so using a join statement as above as a placeholder allows you to get this
cartesian and then the 3rd table which relates these 2 may be used to show
whether the given employee is related to the service or not -- that way you
get one record in the query per cell in the table, regarldess of
relationship -- it makes outputting the display a lot simpler ...

The problem with leaving the join statement out is that ime with SQL Server
it errors when you try to join the 3rd table to the 1st table if the 1st and
2nd table are separated only by a comma, i.e.

from tlb1, tbl2
left join tlb3 on ( tbl3.xid = tbl1.xid )

it returns an error message that says tbl1 doesn't exist in the query (which
it obviously does) so that's why the join statement is there ...

Isaac

www.turnkey.to
954-776-0046

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to