RE: CALLING ALL SQL EXPERTS, Please help

2006-11-16 Thread Axel Jensen
Message- From: Teddy Payne [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 9:48 AM To: CF-Talk Subject: Re: CALLING ALL SQL EXPERTS, Please help Can you provide a sample of the table prior to your joins so that I may see your foreign keys. Teddy On 11/16/06, Axel Jensen <[EM

Re: CALLING ALL SQL EXPERTS, Please help

2006-11-16 Thread Teddy Payne
Can you provide a sample of the table prior to your joins so that I may see your foreign keys. Teddy On 11/16/06, Axel Jensen <[EMAIL PROTECTED]> wrote: > > > > > > > I'm trying to create a "most recently updated" list of tracks that we > update, and track our bugs, and feature requests with. Th

RE: CALLING ALL SQL EXPERTS, Please help

2006-11-16 Thread Brad Wood
I place my vote with Jim and Rick. They beat me to it. ~Brad -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 9:44 AM To: CF-Talk Subject: Re: CALLING ALL SQL EXPERTS, Please help You need a group by and an aggregate function: SELECT

Re: CALLING ALL SQL EXPERTS, Please help

2006-11-16 Thread Rick Root
(if I forgot to exclude it.. do NOT use the "distinct" in that query) ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four ti

Re: CALLING ALL SQL EXPERTS, Please help

2006-11-16 Thread Rick Root
You need a group by and an aggregate function: SELECT DISTINCTe.createdByUserID,i.itemID, i.title, max(e.datecreated) FROMevents e JOIN v_items i ON e.itemID = i.itemID WHERE e.createdbyuserid = 92 GROUP BYe.createdByUserID, i.itemID, i.title ORDE

Re: CALLING ALL SQL EXPERTS, Please help

2006-11-16 Thread Jim Wright
Axel Jensen wrote: > I'm trying to create a "most recently updated" list of tracks that we > update, and track our bugs, and feature requests with. > > SELECT DISTINCTe.createdByUserID,i.itemID, i.title, e.datecreated > FROMevents e > JOINv_items i ON e.itemID = i