Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 select one row two time

Author  Topic 

usman531
Starting Member

2 Posts

Posted - 2008-08-21 : 03:17:30
i have two table after puting join on that two table i am getting the following resut;
CustID ::: EUserID ::: Name
123456 ::: 123456 ::: asdaf

i want if the both ids are same then i get two rows like

CustID ::: EUserID ::: Name
123456 ::: ------ ::: asdaf
------ ::: 123456 ::: asdaf

can u please help me to get out of this problem
thanks.
Usman

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-21 : 03:43:54
quote:
Originally posted by usman531

i have two table after puting join on that two table i am getting the following resut;
CustID ::: EUserID ::: Name
123456 ::: 123456 ::: asdaf

i want if the both ids are same then i get two rows like

CustID ::: EUserID ::: Name
123456 ::: ------ ::: asdaf
------ ::: 123456 ::: asdaf

can u please help me to get out of this problem
thanks.
Usman


Can you post the code you used?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-21 : 03:58:54
quote:
Originally posted by usman531

i have two table after puting join on that two table i am getting the following resut;
CustID ::: EUserID ::: Name
123456 ::: 123456 ::: asdaf

i want if the both ids are same then i get two rows like

CustID ::: EUserID ::: Name
123456 ::: ------ ::: asdaf
------ ::: 123456 ::: asdaf

can u please help me to get out of this problem
thanks.
Usman


Are you using GROUP BY in your query now?
Go to Top of Page
   

- Advertisement -