query assistance

Поиск
Список
Период
Сортировка
От Jodi Kanter
Тема query assistance
Дата
Msg-id 3FA7C2CE.4000902@virginia.edu
обсуждение исходный текст
Ответы Re: query assistance
Re: query assistance
Список pgsql-sql
Is there a straight forward way to pull out duplicates in a particular field given a value in another field?<br /> For
example,I have a table that lists users and study names associated with those users. Each user can have one or more
studynames. My goal is to determine if any of these people have duplicate study names. There are duplicated study names
acrossthe system and that is ok. I just want to see if any users have duplicate study names among their studies.<br />
Mytable looks like this:<br /><br />                                    Table "public.study"<br />     Column   
|           Type             |                Modifiers                 <br />
--------------+-----------------------------+------------------------------------------<br/>  sty_pk       |
integer                    | not null default nextval('pk_seq'::text)<br />  study_name   | character varying(128)     
|not null<br />  start_date   | timestamp without time zone | <br />  sty_comments | text                        | <br
/> created_by   | integer                     | <br /> Indexes: study_pkey primary key btree (sty_pk)<br /><br /> I am
concerenedwith study_name. The created_by field tells me who owns it.<br /> Thanks<br /> Jodi<br /><br /><div
class="moz-signature">--<br /></div><div class="Section1"><p class="MsoNormal"><i><span style="font-size: 9pt;
font-family:Arial;">_______________________________<br /></span></i><i><span style="font-size: 10pt;">Jodi L Kanter<br
/>BioInformatics Database Administrator<br /> University of Virginia<br /> (434) 924-2846<br /><a
href="mailto:jkanter@virginia.edu">jkanter@virginia.edu</a></span></i><spanstyle="font-size: 11pt; font-family:
Arial;"><brstyle="" /><br style="" /></span><p class="MsoNormal"><span style="font-size: 11pt; font-family:
Arial;"> </span><pclass="MsoNormal"><i><span style="font-size: 9pt; font-family: Arial;"> </span></i><p
class="MsoNormal"><i><spanstyle="font-size: 9pt; font-family: Arial;"> </span></i></div> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: Christoph Haller
Дата:
Сообщение: Re: create type input and output function examples
Следующее
От: Paul Ganainm
Дата:
Сообщение: Re: Using UNION inside a cursor