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 |
esambath
Yak Posting Veteran
89 Posts |
Posted - 2009-04-13 : 02:47:59
|
Hi, I am using two tables. 1.Newsletter 2. UserNewsLetter. Newsletter table UserNewsLetter table NewsID NewsletterName UserId NewsletterID 1 Newsletter1 1 1 2 Newsletter2 1 2 3 Newsletter3 2 1 4 Newsletter4 1 3I need following output for userID 1 NewsID Status 1 True 2 True 3 True 4 False I am need to get NewsID and Status for each user |
|
dsindo
Starting Member
45 Posts |
Posted - 2009-04-14 : 20:12:17
|
you mean? NewsID Status1 True2 True3 False4 Trueyou have sample data on UserNewsLetter table |
|
|
ashley.sql
Constraint Violating Yak Guru
299 Posts |
Posted - 2009-04-15 : 22:08:33
|
why is 3 true to userid 1, is this what u meanUSERID NewsID Status1 1 True1 2 True1 3 FALSE1 4 TrueUse CASE STATEMENTS-----------------------------------------------------------------------------------------------Ashley Rhodes |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-04-15 : 23:53:20
|
Hi ,Can u Explain Clearly what u want ? |
|
|
|
|
|