I need some help with a sql statement:
I have two tables:
1 ---------------> *
teaserusers log_userstatus
----------- --------------
userid (varchar) logid (varchar)
nickname (text) userid (varchar)
firstname (text) fieldchanged (varchar)
email (text) logdate (datetime)
etc... etc...
The "teaserusers" table has the data about all users.
The "log_userstatus" table keeps track of specific events and tracks their
occurrence.
These tables, although not explicitly related in the RDBMS, have a
"one-to-many" relationship based on the "userid."
I would like to write a statement that gives me a list of all users in the
"teaserusers" table and the last "logdate" entered into the table for each
user listed.
Here's the catch, and i think this is what is preventing my code from
working: Not all users have entries in the "log_userstatus" table. This
means that a simple inner join will not work. I've also tried the left outer
and full outer joins, not providing the results i need.
Is this possible? if so, can you all please help me write the sql code for
it?
Thanks for all your help!
andres
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists