daniel kessler wrote: > honestly, though - I've read and re-read it over several times and I just > don't get it. Would you mind walking me through it a bit? There's clearly > some bit of information that I'm not getting. >
commented... SELECT n.meeting_name,n.type,n.note_date,n.notes,n.type_describe FROM notes_to_the_record n /**The above part should be pretty self explanatory...one thing to note, is that there is no JOIN in this query**/ WHERE n.ID = #session.user.id# /**This part makes sure that we pull back any of the records that are associated with the current user**/ OR /**We use an OR because a record may be associated with the current user OR it may be shared with the current user, and we want to get both scenarios. It could be both, but it can't be neither**/ n.n_r_id IN (SELECT n_r_id FROM notes_to_the_record_shared WHERE id = #session.user.id#) /**This is probably the part that gave you the most trouble...think of the subquery the same way you might a list of values...say that query returns the values 123,345,678...then you can think of this part of the query the same as "n.n_r_id IN (123,345,678)"**/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:267821 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4