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.
Author |
Topic |
abhishek_kumar_rch
Starting Member
6 Posts |
Posted - 2014-12-25 : 22:31:01
|
Hi,I am designing a webpge using asp.net with sql server 2005in back end there is table with followding columnsusername,name,phone1,phone2,age and some others columns are there for storing user's details.I would like to select in such a way so that i entermore than one user name seperated with commas in textboxin selection result i get all the phone numbers associated with that usernames.For exampleUsernames Name Phone1 Phone2abc@yahoo.com Abhi 9334459287 9334459288def@yahoo.com Sony 9935199351 efg@yahoo.com Tony 9835198351 9835198351Select Phone1,Phone2 from tblregistration where usernames=abc@yahoo.com,def@yahoo.com,efg@yahoo.comIn result i like all the phone numbers 9334459287 933445928899351993519835198351 9835198351Please help me. |
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2014-12-26 : 01:37:55
|
Select Phone1,Phone2 from tblregistration where usernames in('abc@yahoo.com','def@yahoo.com','efg@yahoo.com')Javeed Ahmedhttps://www.linkedin.com/pub/javeed-ahmed/25/5b/95 |
|
|
|
|
|