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 |
|
MrB
Starting Member
2 Posts |
Posted - 2011-04-30 : 01:18:19
|
| Hi folks, I'm writing to write a stored proc in which I query a 'Redeemed Coupon' table. The table contains the userid of the redeeming user, and the offerid of the redeemed coupon. What I want the query to do is return the offers a customer is eligible for, like so:Select vendorname, offertitle, offertext, offerid from OffersInner Join Vendors on Vendors.vendorid = Offers.vendoridWHERE (pseudocode here- @userid and offerid not in Redeemed Offers)How do I write this? Thanks! |
|
|
MrB
Starting Member
2 Posts |
Posted - 2011-04-30 : 02:33:20
|
| Never mind- turns out I had the right code this whole time, but the wrong data! :/ |
 |
|
|
|
|
|