SQL distinct

2005-11-02 Thread Saturday (Stuart Kidd)
Hi guys, I'm trying to do something simple but having a bit of a bother. cfquery name=GetUsers datasource=user020 SELECT u.userID, u.firstName, u.lastName, e.eventID, e.userID FROM tbl_020publicUsers u, tbl_020eventDetails e WHERE u.userID = e.userID /cfquery I'm trying to get a list of all the

RE: SQL distinct

2005-11-02 Thread Mosh Teitelbaum
Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 12:56 PM To: CF-Talk Subject: SQL distinct Hi guys, I'm

Re: SQL distinct

2005-11-02 Thread Michael Traher
that is because you are getting the event details as well e.eventID and e.userID if you remove these from the select list and put the DISTINCT back that should do the trick. Mike T On 11/2/05, Saturday (Stuart Kidd) [EMAIL PROTECTED] wrote: Hi guys, I'm trying to do something simple but

RE: SQL distinct

2005-11-02 Thread Ian Skinner
cfquery name=GetUsers datasource=user020 SELECT u.userID, u.firstName, u.lastName, e.eventID, e.userID FROM tbl_020publicUsers u, tbl_020eventDetails e WHERE u.userID = e.userID /cfquery By selecting e.eventID from the tbl_020eventDetails e table, every row selected is going to be distinct. A

RE: SQL distinct

2005-11-02 Thread Hassan Arteaga
este email por error, por favor comunĂ­quelo de inmediato al emisor del mismo. -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 12:56 PM To: CF-Talk Subject: SQL distinct Hi guys, I'm trying to do something simple but having

RE: SQL distinct

2005-11-02 Thread Ian Skinner
The original OP did have an inner join using the older style of putting the join in the WHERE clause. If he is on a system like me, using an older Oracle 8i or previous version, he can't use the new fangled (13 year old) syntax of INNER JOIN, OUTER JOIN, FULL JOIN, CROSS JOIN. Oh how I wish I

Re: SQL distinct

2005-11-02 Thread Saturday (Stuart Kidd)
PROTECTED] Sent: Wednesday, November 02, 2005 12:56 PM To: CF-Talk Subject: SQL distinct Hi guys, I'm trying to do something simple but having a bit of a bother. cfquery name=GetUsers datasource=user020 SELECT u.userID, u.firstName, u.lastName, e.eventID, e.userID FROM tbl_020publicUsers

SQL: distinct count

2003-03-11 Thread Owens, Howard
The following query doesn't quite do what I want it to do, and I'm stumped on how to get what I want ... SELECT COUNT(a_items.WINE_TYPE_ID) AS WCOUNT, w_types.TYPE_ID, w_types.TYPE, a_items.TYPE_ID, a_items.END_TIME FROM w_types,

SQL DISTINCT Question

2002-04-18 Thread Jeff Green
SELECT DISTINCT Email FROM LinkedEmails returns a record set with no dupe emails, but I want first and last names as well so i try SELECT DISTINCT Email, FirstName, LastName FROM LinkedEmails returns a record set that has dupe email fields How would I query for unique emails and get the first

RE: SQL DISTINCT Question

2002-04-18 Thread Sam Roach
try: SELECT email, first(firstname), first(lastname) FROM people GROUP BY email; -- Sam -Original Message- From: Jeff Green [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 4:15 PM To: CF-Talk Subject: SQL DISTINCT Question SELECT DISTINCT Email FROM LinkedEmails returns

RE: SQL DISTINCT Question

2002-04-18 Thread Jeff Green
: RE: SQL DISTINCT Question try: SELECT email, first(firstname), first(lastname) FROM people GROUP BY email; -- Sam -Original Message- From: Jeff Green [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 4:15 PM To: CF-Talk Subject: SQL DISTINCT Question SELECT DISTINCT Email

RE: SQL DISTINCT Question

2002-04-18 Thread Sam Roach
creative :) -- Sam -Original Message- From: Jeff Green [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 4:55 PM To: CF-Talk Subject: RE: SQL DISTINCT Question Thanks Sam, got the following to work but I like yours better ;) SELECT Email, FirstName, LastName FROM Users WHERE

RE: sql distinct

2001-11-02 Thread Pascal Peters
Doesn't the distinct work for the whole select and not just the first field? -Original Message- From: Michael Vinson [mailto:[EMAIL PROTECTED]] Sent: donderdag 1 november 2001 16:45 To: CF-Talk Subject: sql distinct My distinct is no longer distinct after a simple, but major, change

RE: sql distinct

2001-11-02 Thread Andy Ewings
. -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED]] Sent: 02 November 2001 10:28 To: CF-Talk Subject: RE: sql distinct Doesn't the distinct work for the whole select and not just the first field? -Original Message- From: Michael Vinson [mailto:[EMAIL PROTECTED]] Sent

sql distinct

2001-11-01 Thread Michael Vinson
My distinct is no longer distinct after a simple, but major, change. SELECT DISTINCT CategoryIdTable.Category, CategoryIdTable.CategoryID, CourseTable.CategoryID, CourseTable.PartNumber FROM CategoryIdTable, CourseTable WHERE CategoryIdTable.CategoryID = CourseTable.CategoryID AND