I want to pull data from a db where the l_name fields are distinct.  I have 
created the SP below.  Obviously, I am not much of a SQL person.

The Distinct keyword in being applied for the whole select statement, which 
would be fine if not for 'a.time_slot'. Is there a way to limit the distinct 
just for l_name in the SP below?

SELECT DISTINCT s.f_name, s.l_name, s.pro_title, c.co_name, sm.subject, 
a.agenda_title, s.sp_file, a.time_slot
FROM speakers s, company c, subject_matter sm, agenda a
WHERE a.time_slot = s.time_slot
AND s.subject_id = sm.subject_id
AND s.company_id = c.company_id
AND s.sp_file is not null
ORDER BY s.f_name, s.l_name

Thanks,
Tim Bahlke


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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