Hello

I have simple query here that seems to be giving
uneeded info and I am hoping that some mysql pros know
whats going on here. Basically I want the first query
to show the second results. We choose a distinct
a.oprid and if we leave out the "order by a.effdttime
desc" the query gives what I want, but when adding it,
I get extra info thats uneeded. 
If you need more info please reply as I hope I put
everything needed here
Thanks

select distinct a.oprid, a.id, b.firstname,
b.lastname, b.work_note, client_status, b.work_dt time
from oprid_client_history a, cust b where
a.id=b.custid and a.oprid='david' and a.effdttime >=
curdate() order by a.effdttime desc

oprid  id     firstname  lastname   work_note    
client_status  work_dt  
-----  --     ---------  --------   ---------    
-------------  ----------
david  23813  Marie      Francis    Call Discover  A  
          2002-05-19  
david  1      David      Potter II  ok bye ok      LW 
          2003-05-10  
david  1      David      Potter II  ok bye ok      LW 
          2003-05-10  
david  1      David      Potter II  ok bye ok      LW 
          2003-05-10  
david  1      David      Potter II  ok bye ok      LW 
          2003-05-10  
david  1      David      Potter II  ok bye ok      LW 
          2003-05-10  
david  21116  Cherada    Bressler   selling!        A 
          2002-05-20  
david  50687  Edwin (Chip)Barto  call days         O  
          2002-05-21  



select distinct a.oprid, a.id, b.firstname,
b.lastname, b.work_note, client_status, b.work_dt time
from oprid_client_history a, cust b where
a.id=b.custid and a.oprid='david' and a.effdttime >=
curdate()

oprid  id     firstname  lastname  work_note 
client_status  work_dt  
-----  ---    ---------  --------  --------- 
-------------  ----------
david  50687  Edwin (Chip)Barto    call days        O 
      2002-05-21  
david  21116  Cherada    Bressler  selling!         A 
      2002-05-20  
david  1      David      Potter II ok bye ok       LW 
      2003-05-10  
david  23813  Marie      Francis   Call Discover   A  
      2002-05-19  

=====


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to