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 |
|
mlawton40
Starting Member
15 Posts |
Posted - 2007-04-24 : 11:39:14
|
| Hi, I have the following tables:ARARIdMSL_ShortnameXRef_AR_UserARIdUserNameI am trying to return all MSL_Shortname's from AR where the username parameter IS NOT associated with an ARId in XRef_AR_User.Any ideas? I keep getting multiple values of the same shortname and not enough shortname's can't seem to get the sql to return all the correct results.Any help would be great.Thanks, Mark |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-04-24 : 11:43:26
|
[code]select MSL_Shortnamefrom AR a left join XRef_AR_User bon a.ARId = b.ARIdwhere b.ARId is null[/code] KH |
 |
|
|
cvraghu
Posting Yak Master
187 Posts |
Posted - 2007-04-24 : 13:55:58
|
quote: Originally posted by mlawton40I am trying to return all MSL_Shortname's from AR where the username parameter IS NOT associated with an ARId in XRef_AR_User.
I'm not able to understand this statement. Please provide some sample data and expected output. Do you want to get all users in AR who are not available in XRef_AR_User? |
 |
|
|
|
|
|