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 |
|
mike123
Master Smack Fu Yak Hacker
1462 Posts |
Posted - 2003-06-26 : 05:45:32
|
| I have 2 tablestblUsers (userID, nameOnline)tblInterests (userID, interestID)I am trying to create a list of all users in TBLUSERS that have a certain interest. For exampleI want to pass interestID = 1 to the stored procedure. I want to bring back all records in TBLUSERS that have their userID in the tblInterests with a corresponding INTERESTID of 1.Any assistance greatly appreciated, this is a bit over my head.Thanks alot guys.Mike123 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-06-26 : 07:08:23
|
I'd recommend you look into buying a good book on SQL.declare @interestID intselect @interestID = 1select u.userid, u.nameonlinefrom dbo.tblUsers u inner join dbo.tblInterests i on u.userID = i.userIDwhere i.interestID= @interestID Jay White{0} |
 |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-06-26 : 09:53:05
|
You sound like a book yourself... and anyway... you've given him the answer so he doesn't need to buy a book! |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-06-26 : 10:40:33
|
| Yes, but Jay is just Page 47. What of all the other pages?Sam |
 |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2003-06-26 : 11:54:56
|
Index is on Page 47 -------------------------What lies behind you and what lies ahead of you are small matters compared to what lies within you.-Ralph Waldo EmersonEdited by - nazim on 06/26/2003 11:55:35 |
 |
|
|
|
|
|