Okay, I have a database, not designed by me, but I have to work with it, 
with these tables:

_Owners_
OwnerID
OwnerName
etc

_Clients_
ClientID
OwnerFK
ClientName
etc

_Users_
UserID
ClientFK
FirstName
etc

_Bridge_
BridgeID
UserFK
FileFK

_Files_
FileID
FileName
etc

What I need to do is select all files that are "owned" by one owner's 
ID.  If you follow the above diagram, I need to get all the files using 
the fileID field, get all the UserFK's from the bridge table, get all 
the ClientFK's from the Users table using the UserFKs, all the way up to 
the owners, where I currently hold the OwnerID in a Session Var.

I think that I need to do a complicated (for me) join statement that 
links each table all the way up the line until I get a WHERE OwnerID = 
#SESSION.OwnerID# type-statement, but I have no idea how to construct 
that.  Anybody wanna help me out?  I think this exercise will help me 
understand the concept of joins quite a bit more.  I've written simple 
ones plenty of times, but this bugger is a PITA.

Thanks!

Ray
-- 
=================================================================
Ray Champagne - Senior Application Developer
CrystalVision Web Site Design and Internet Services
603.433.9559
www.crystalvision.org
=================================================================

The information contained in this transmission (including any
attached files) is CONFIDENTIAL and is intended only for the
person(s) named above. If you received this transmission in
error, please delete it from your system and notify us
immediately. If you are not an intended recipient, please note
that any use or dissemination of the information contained in this
transmission (including any attached files) and the copying,
printing, or retransmission of that information is strictly
prohibited. You can notify us by return email or by phone at
603.433.9559.

Thank you.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207828
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to