You may have to make sure everything is in the same case and leading/trailing blanks are removed
Select distinct t.studentID,t2.goalID from table1 t, table2 t2 where Upper(trim(t.studentID))=Upper(trim(t2.studentID)) an alternative using a subquery Select distinct t.studentID,t2.goalID from table1 t, (select distinct studentID,goalID from table2) t2 where Upper(trim(t.studentID))=Upper(trim(t2.studentID)) There is an assumption that each student has one and only one GoalID. (so much for changing majors!) The second alternative can be reworked so that condition is met -----Original Message----- From: Adaryl Wakefield [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 4:14 PM To: [EMAIL PROTECTED] Subject: Re: [KCFusion] an easy one Yes ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 23, 2003 3:56 PM Subject: RE: [KCFusion] an easy one > Are the studentID and goalID unique when combined? > > -----Original Message----- > From: Adaryl Wakefield [mailto:[EMAIL PROTECTED] > Sent: Monday, June 23, 2003 3:55 PM > To: [EMAIL PROTECTED] > Subject: Re: [KCFusion] an easy one > > > Tried that still got a funny record set. Here is a simplifaction of the > statement > > SELECT DISTINCT table1.studentID, table2.goalID > FROM table1, table2 > WHERE table1.studentID = table2.studentID > > I still keep getting multiple tuples for one studentID > A. > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, June 23, 2003 3:31 PM > Subject: RE: [KCFusion] an easy one > > > > SELECT DISTINCT id > > > > -----Original Message----- > > From: Adaryl Wakefield [mailto:[EMAIL PROTECTED] > > Sent: Monday, June 23, 2003 3:33 PM > > To: [EMAIL PROTECTED] > > Subject: [KCFusion] an easy one > > > > > > Its been so long since ive done this i forgot how. In an sql statement i > > want only unique values of a field. I tried > > SELECT Unique (id) as id > > > > but that did not work. > > A. > > > > > > > > > > ______________________________________________________________________ > > The KCFusion.org list and website is hosted by Humankind Systems, Inc. > > List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED] > > Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] > > To Subscribe.................... mailto:[EMAIL PROTECTED] > > To Unsubscribe................ mailto:[EMAIL PROTECTED] > > > > > > > > ______________________________________________________________________ > > The KCFusion.org list and website is hosted by Humankind Systems, Inc. > > List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED] > > Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] > > To Subscribe.................... mailto:[EMAIL PROTECTED] > > To Unsubscribe................ mailto:[EMAIL PROTECTED] > > > > > > > > > ______________________________________________________________________ > The KCFusion.org list and website is hosted by Humankind Systems, Inc. > List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED] > Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] > To Subscribe.................... mailto:[EMAIL PROTECTED] > To Unsubscribe................ mailto:[EMAIL PROTECTED] > > > > ______________________________________________________________________ > The KCFusion.org list and website is hosted by Humankind Systems, Inc. > List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED] > Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] > To Subscribe.................... mailto:[EMAIL PROTECTED] > To Unsubscribe................ mailto:[EMAIL PROTECTED] > > ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED] Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED] ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED] Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED]