RE: cfquery - subquerie>

2002-11-21 Thread Everett, Al
The trick is to join the table on itself. SELECT emp.employee_number, emp.emp_last_name, emp.emp_preferred_name, emp.email_id, sup.email_id AS SupervisorEmailID FROM tbl_Employee emp, tbl_Employee sup WHERE emp.employee_number = #FORM.EmployeeName#

RE: cfquery - subquerie>

2002-11-21 Thread Luce, Greg
2002 2:43 PM To: CF-Talk Subject: RE: cfquery - subquerie> How's this work? SELECT employee_number,emp_last_name, emp_preferred_name, sup_short_name, email_id FROM tbl_Employee WHERE emp_short_name = '#Trim(qEmployeeL

RE: cfquery - subquerie>

2002-11-21 Thread Mosh Teitelbaum
Erm... am I missing something here? Aren't these 2 queries pulling the same (or a subset of the same) data from the same table? What does the second query get you that the first query doesn't? -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: htt

RE: cfquery - subquerie>

2002-11-21 Thread Luce, Greg
How's this work? SELECT employee_number,emp_last_name, emp_preferred_name, sup_short_name, email_id FROM tbl_Employee WHERE emp_short_name = '#Trim(qEmployeeList.sup_short_name)#' AND employee_number = #FORM.EmployeeName# --