CHOOSE vdeptcode FROM #VALUES FOR DISTINCT (department_code & [[ name of dept from dept table]]), department_code + FROM main, deptName + WHERE building_code=.vbuildcode and main.department = department.department + ORDER BY departmentJames Hageman <[EMAIL PROTECTED]> wrote:
>I have 3 tables, [main], [building], and [department]. Main has FKs for >Building and Department. I want to know what departments i have in >certain buildings (maybe more than one) > >I first get the Building FK here: (I can choose by building name and >return the building key) > >CHOOSE vbuildcode FROM #VALUES FOR building_name, building_id �+ >FROM building + >ORDER BY building_name LINES 25 > >Then I get the Department FK based on the first CHOOSE: > >CHOOSE vdeptcode FROM #VALUES FOR DISTINCT (department_code & [[ name of >dept from dept table]]), department_code �+ >FROM main + >WHERE building_code=.vbuildcode ORDER BY department_code > >What I want to to be able to also have the name of the department show >up in the second choose, but I can't figure out how to do that. > > -- Albert Berry Full Time Consultant to PSD Solutions 350 West Hubbard, Suite 210 Chicago, IL 60610 312-828-9253 Ext. 32 __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

