Hi guys, I wonder if I may ask for your help here.
I have two tables RoleNames and Roles where RoleNames are the available
roles and Roles are the Roles which the users 'may' have.
RoleName
ID int
RoleName char(10)
Roles
RoleID int
user_name NVCHAR
I need to find our what roles a give user does not have. I'm struggling with
what I am sure is a simple query. Any help is appreciated.Please post *real* DDL and sample data, so we don't have to guess what the
relationships between these two table are.
Also consider normalizing your model some more.
There are two entities and a many-to-many relationship so, I guess you're a
table short. Do not design tables until you have a sound concept and logical
model.
Entities:
1) users;
2) roles.
Relationships:
1) users in roles.
ML
http://milambda.blogspot.com/|||What makes you think this is a many to many relationship ?
RoleNames PK can appear Many Time in Roles FK. - This is pretty simple
stuff. I have not seen you come up with an answer to anything yet so please
stop replying to my posts unless you can offer some solution.
"ML" <ML@.discussions.microsoft.com> wrote in message
news:A09D1C25-9164-4C79-A900-12DDC7F343EA@.microsoft.com...
> Please post *real* DDL and sample data, so we don't have to guess what the
> relationships between these two table are.
> Also consider normalizing your model some more.
> There are two entities and a many-to-many relationship so, I guess you're
> a
> table short. Do not design tables until you have a sound concept and
> logical
> model.
> Entities:
> 1) users;
> 2) roles.
> Relationships:
> 1) users in roles.
>
> ML
> --
> http://milambda.blogspot.com/|||In fact just forget it, Ive worked it out for myself without your useless
input.
"ML" <ML@.discussions.microsoft.com> wrote in message
news:A09D1C25-9164-4C79-A900-12DDC7F343EA@.microsoft.com...
> Please post *real* DDL and sample data, so we don't have to guess what the
> relationships between these two table are.
> Also consider normalizing your model some more.
> There are two entities and a many-to-many relationship so, I guess you're
> a
> table short. Do not design tables until you have a sound concept and
> logical
> model.
> Entities:
> 1) users;
> 2) roles.
> Relationships:
> 1) users in roles.
>
> ML
> --
> http://milambda.blogspot.com/|||Good.
ML
http://milambda.blogspot.com/|||> stop replying to my posts
Ok.
ML
http://milambda.blogspot.com/
No comments:
Post a Comment