Re: Duplicates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




select distinct Date from table_name where name = 'Test';

Jeff


                                                                                                                    
                    "Chris Grigor"                                                                                  
                    <chris@calibre       To:     "PHP Gen" <php-general@lists.php.net>, "PHP DB"                    
                    .co.za>               <php-db@lists.php.net>                                                    
                                         cc:                                                                        
                    10/23/2002           Subject:      Duplicates                                           
                    08:04 AM                                                                                        
                                                                                                                    
                                                                                                                    




Howdi all,

How can you list the contents of a table and skip duplicate Dates??
eg

select Date from table_name where name = 'Test';

----------------------------------------
|Date|
----------------------------------------
2000-01-01
2000-01-02
2000-01-02   <------- How would you get rid of this duplicate date (without
deleting it ;-))?

I want to just get a list of dates in the table that querys have been
inserted, but not duplicate dates...

Say for instance I had 1 entry on 2000-01-01, and I had 10 entrys on
2000-01-02 I want it to tell me that
there is a date for 2000-01-01 and a date for 2000-01-02, not for it to
tell
me there is 10 entrys on 2000-01-02

Any help would be appreciated

Many Thanks guys





--------------------------------------
Chris Grigor

Calibre Clinical Consultants

--------------------------------------



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux