N
Nicolas
What would be the Select Query for the following case.
I scratch my head but i'm only loosing my hair so far.
2 Records in tables
table Person
[Name] [FavSports]
Nicolas 12
Frank 2
John 10
Those entries and specialy the FavSports are based on an enum with
FlagsAttibute which allow multiple choice
<FlagsAttribute()> _
public enum Sports
None = 0
Soccer = 1
Tennis = 2
Hockey = 4
Swimming = 8
Football = 16
end enum
Now I want to retrive from the database all person who have Tennis (2) as
their favorite sport
SELECT * FROM Person WHERE FavSport = ?????? ORDER BY Name Asc;
I shoul get Frank and John
So what who be the routin to get the proper SELECT Statement
Thanks a lot for the help
I scratch my head but i'm only loosing my hair so far.
2 Records in tables
table Person
[Name] [FavSports]
Nicolas 12
Frank 2
John 10
Those entries and specialy the FavSports are based on an enum with
FlagsAttibute which allow multiple choice
<FlagsAttribute()> _
public enum Sports
None = 0
Soccer = 1
Tennis = 2
Hockey = 4
Swimming = 8
Football = 16
end enum
Now I want to retrive from the database all person who have Tennis (2) as
their favorite sport
SELECT * FROM Person WHERE FavSport = ?????? ORDER BY Name Asc;
I shoul get Frank and John
So what who be the routin to get the proper SELECT Statement
Thanks a lot for the help