Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > query question ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 14 Topic 15372 of 17602
Post > Topic >>

query question really cant give a summary here so read the body ;-)

by rhys.stewart@[EMAIL PROTECTED] ("Rhys Stewart") Apr 23, 2008 at 01:11 PM

------=_Part_18511_33044583.1208974312074
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi all,

have the following table

aid    | bid
--------------
1    |5
2    |6
3    |7
4    |9
5    |1
6    |2
7    |3
8    |10
9    |4
10  |8
both aid & bid represent the same data in another table, but the table has
duplicate data and i did a self-join to get the id's out. The question is
how do i get a distinct listing between both columns

like
aid | bid
-----------
1|5
2|6
3|7
4|9
10|8

Have been racking my brain for the past hour....any suggestions?

Thanks
Rhys

------=_Part_18511_33044583.1208974312074
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi all,<br><br>have the following table<br><br>aid&nbsp;&nbsp;&nbsp; |
bid<br>--------------<br>1&nbsp;&nbsp;&nbsp; |5<br>2&nbsp;&nbsp;&nbsp;
|6<br>3&nbsp;&nbsp;&nbsp; |7<br>4&nbsp;&nbsp;&nbsp;
|9<br>5&nbsp;&nbsp;&nbsp; |1<br>6&nbsp;&nbsp;&nbsp;
|2<br>7&nbsp;&nbsp;&nbsp; |3<br>8&nbsp;&nbsp;&nbsp;
|10<br>9&nbsp;&nbsp;&nbsp; |4<br>10&nbsp; |8<br>both aid &amp; bid
represent the same data in another table, but the table has duplicate data
and i did a self-join to get the id&#39;s out. The question is how do i get
a distinct listing between both columns<br>
<br>like<br>aid |
bid<br>-----------<br>1|5<br>2|6<br>3|7<br>4|9<br>10|8<br><br>Have been
racking my brain for the past hour....any
suggestions?<br><br>Thanks<br>Rhys<br>

------=_Part_18511_33044583.1208974312074--
 




 14 Posts in Topic:
query question really cant give a summary here so read the body
rhys.stewart@[EMAIL PROTE  2008-04-23 13:11:52 
Re: query question really cant give a summary here so read the b
scott.marlowe@[EMAIL PROT  2008-04-23 12:37:04 
Re: query question really cant give a summary here so read the b
straterj@[EMAIL PROTECTED  2008-04-23 11:56:50 
Re: query question really cant give a summary here so read the b
Jon.Roberts@[EMAIL PROTEC  2008-04-23 14:33:35 
Re: query question really cant give a summary here so read
rod@[EMAIL PROTECTED] (&  2008-04-23 20:46:36 
Re: query question really cant give a summary here so read the b
Jon.Roberts@[EMAIL PROTEC  2008-04-23 15:41:50 
Re: query question really cant give a summary here so
cww@[EMAIL PROTECTED] (C  2008-04-23 16:52:37 
Re: query question really cant give a summary here so read the b
rhys.stewart@[EMAIL PROTE  2008-04-24 16:43:23 
Re: query question really cant give a summary here so read the b
scott.marlowe@[EMAIL PROT  2008-04-24 16:43:11 
Re: query question really cant give a summary here so read the b
erik@[EMAIL PROTECTED] (  2008-04-24 19:56:12 
Re: query question really cant give a summary here so read
jd@[EMAIL PROTECTED] (&q  2008-04-24 18:03:09 
Re: query question really cant give a summary here so read the b
rhys.stewart@[EMAIL PROTE  2008-04-25 11:56:51 
Re: query question really cant give a summary here so
cww@[EMAIL PROTECTED] (C  2008-04-25 13:07:42 
Re: query question really cant give a summary here so read the b
rhys.stewart@[EMAIL PROTE  2008-04-25 12:25:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 18:50:56 CST 2008.