I have a table (notes_to_the_record) of meeting notes  
(fields:n_r_id,id,meeting_name,date_added,follow_up).
A new feature is that the meeting note is shared to a set of users.  
So since multiple users can be selected, I made a new table called  
notes_to_the_record_shared (n_r_shared_id,n_r_id,id).
In both those, id references a People table, so it's the person's ID

Here are the two tables:
http://hhp.umd.edu/home/db_display.cfm  (table of notes)
http://hhp.umd.edu/home/db_display_shared.cfm (shared table)

When I do the search, I make sure that the person can only see their  
own notes, so ID = #session.user.id#. Now with the notes ability to  
be shared, I'm not sure how to expand the search to be "any notes  
with my id in this table and any notes with my id in this second  
table" and join correctly to have all the information.

I have it set up so that there is a record (n_r_id = 441) that is  
shared to a person with id 3

I was told in a DB forum "Use outer join. table1.id = table2.id(+)".   
So I'm doing that and it doesn't seem to be working.  Here's the SQL:
SELECT n.meeting_name,n.type,n.note_date,n.notes,n.type_describe
FROM notes_to_the_record n,notes_to_the_record_shared s
WHERE
       n.ID = #session.user.id# AND
       n.id = s.id(+)
ORDER BY UPPER(n.meeting_name) ASC



Please help - I'm really at a stand-still here.


-- 

Daniel Kessler

College of Health and Human Performance
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
Phone: 301-405-2545
http://hhp.umd.edu




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:267273
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to