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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-05 : 09:01:21
|
| Janak writes "I have Multiple tables User,Key,Group,usergroup, userkey,groupkey,key tables.I have to collect all the users who has the key values in (1,2,3,4). Now I want to do this in a stored procedure as this sql takes a long time in the asp environment. I have created a view with userid and keyid. This view contains all the keys for each user in the user table. User can have multiple keys so, Now I want to create a temp table that would contain user detail(from user Table) and the lowest key id for that user as auth_key for that user. Stored procedure should return userdetail along with their key (high_auth_key).I would really appreciate your help on this.Thanks in advance.Janak" |
|
|
Jay99
468 Posts |
Posted - 2002-03-05 : 09:25:45
|
| You will need to select the user and the min(keyid) grouping by the user . . .Jay |
 |
|
|
|
|
|