I have a sql question for you all. I'm trying to pull information from a
database, and would like to not pull duplicate records. Unfortunately, one
of the fields I'm pulling is a memo field (Access db). You can't use
distinct or group by on a memo field. Suggestions?
Code looks like this:
<cfquery name="processsearch" datasource="distdiag">
SELECT problem, answer, sub_date, ans_date, answers.case_id
FROM cases INNER JOIN answers ON cases.case_id = answers.case_id
WHERE (1=1)
<cfif form.cat_id IS NOT "">AND (#form.cat_id# = cases.cat_id) </cfif>
<cfif form.a_id IS NOT "">AND (#form.a_id# = cases.a_id) </cfif>
<cfif form.s_id IS NOT "">AND (#form.s_id# = cases.s_id) </cfif>
<cfif form.month IS NOT "">AND (#form.month# = month(sub_date)) </cfif>
<cfif form.year IS NOT "">AND (#form.year# = year(sub_date))</cfif>
</cfquery>
Thanks.
-d
************************************************************
Deanna Schneider
Interactive Media Developer
UWEX Cooperative Extension Electronic Publishing Group
302 Hiram Smith
1545 Observatory Dr.
Madison, WI 53706
(608) 265-7923
------------------------------------------------------------------------------
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.