select
  , d.dep_id
  , d.name
  , o.subdep_id
  , o.name
from
  department d
  left outer join office o
    on d.dep_id = o.dep_id

You need to put dep_id in the office table.  If the department doesn't have
an office, leave teh column null

In the CF, just detect to see if the subdep_id is an empty string and if it
is empty, do not show it.

Teddy


On 12/8/06, Steve LaBadie <[EMAIL PROTECTED]> wrote:
>
> I have created a faculty staff directory.  Several question have arisen
> in my mind regarding the data output. Besides the different sorting
> options, I need help with a filter.
>
>
>
> Among other details I am showing "Title", "Department", and "Office". I
> want to filter out the word "Office" if there isn't a record referenced.
> My columns are dep_id (Department) and subdep_id (Office).  A number is
> the place holder in the emps table. The deps table has two columns
> dep_id and  name, the subdep table has two columns subdep_id and name.
>
>
>
> Example:
>
>
>
> Title:     Director
>
> Department:      Computing Srvs
>
> (if no office, don't show anything here)
>
>
>
> Title: Director
>
> Department: Enrollment Srvs
>
> Office: Admissions (else show)
>
>
>
> Steve LaBadie, Web Manager
> East Stroudsburg University
> 200 Prospect St.
> East Stroudsburg, Pa 18301
> 570-422-3999
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> http://www.esu.edu <http://www3.esu.edu>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
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:263333
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to