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 |
|
dhinasql
Posting Yak Master
195 Posts |
Posted - 2008-03-07 : 07:37:36
|
| Hi Friends,I have two table named as usermgmt and Usertype.Column name for usermgmt are usertypeid,username,address {Ex} 1 ABC IiSuite column name for usertype are typeid,typename {Ex} 1 Student I want to display the username who are all in the particular usertype..Expected Output UserName TypeName AddressABC Student IiSuitePlzz help me to sort out this |
|
|
dhinasql
Posting Yak Master
195 Posts |
Posted - 2008-03-07 : 07:45:29
|
| if i user the usertype is Student i have to display all the results who are in the student usertype...Its Urgent pls |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2008-03-07 : 07:48:50
|
| SELECT a.username,b.typename,a.addressFROM usermgmt aINNER JOIN usertype bON a.usertypeid = b.typeidWHERE b.typename = 'Student'Jim |
 |
|
|
ranganath
Posting Yak Master
209 Posts |
Posted - 2008-03-07 : 07:49:33
|
| hi,try this SELECT UserName, TypeName, AddressFROM usermgmt UINNER JOIN Usertype ut ON ut.typeid = u.usertypeid |
 |
|
|
dhinasql
Posting Yak Master
195 Posts |
Posted - 2008-03-07 : 08:49:23
|
| Hi Ranganath,Thank You very much, I got a solutionOnce again Thanks |
 |
|
|
|
|
|