Current location: Hot Scripts Forums » Programming Languages » PHP » help regd "distinct" keyword in Select stmt


help regd "distinct" keyword in Select stmt

Reply
  #1 (permalink)  
Old 06-10-04, 12:22 PM
noviceforever noviceforever is offline
Newbie Coder
 
Join Date: May 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation help regd "distinct" keyword in Select stmt

I need to retrieve 3 fields from the database-firstname,lastname and emplId. There are a few errors in the data so the spellings of some firstnames are diff for same ppl(same last name) eg. Smith Jones and Smit Jones refer to the same person,but they are spelt incorrectly in one record.However,the emplIds of both are the same.
I need to retrieve only one instance of each person .i.e only either Smith jones or smit jones shud appear but not both...
i tried
select distinct emplId,namefirst,namelast from table where or='3434'
but this does not work..i get both the jones here.
Can i apply distinct to emplID ONLY?

TIA
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
i have 3 select box this is urgent traceMe JavaScript 0 12-02-03 01:24 AM


All times are GMT -5. The time now is 10:38 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.