At 09:40 PM 4/2/00 -0400, you wrote:

Error in previous transmission: The first solution should actually read:

<cfquery name = "SEARCH_EMP_DEPT" datasource="MYTEST" dbtype="ODBC">
SELECT *
FROM y where emp_id LIKE '#SEARCH_QUERY.emp_id#'
</cfquery>


>Assuming that table Y is related to X through the foreign key emp_ID you
>could do this:
>
><cfquery name = "SEARCH_EMP_DEPT" datasource="MYTEST" dbtype="ODBC">
>SELECT *
>FROM y where emp_id LIKE '#SEARCH_QUERY.search_criteria#%'
></cfquery>
>
>
>or, even better, join the two tables into one query like this:
>
>SELECT Y.* FROM Y, X
>WHERE Y.emp_ID = X_EMP_ID
>AND X.emp_name LIKE '#search_criteria#%'
>
>Bruce
>


------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to