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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help with Row Comparison

Author  Topic 

srujanavinnakota
Starting Member

34 Posts

Posted - 2010-07-02 : 13:07:50
Hi,

Can anyone help me with the logic.
I have a scenario where I need to check for the value 50 in OldVal and NewVal columns for each ID.

No Matter where it is, but if OldVAl Or NewVal is 50 then it need to pick up the ID.


ID OldVal NewVal
1 100 10
1 10 50
1 50 150
1 150 100
2 10 1
3 300 30
3 30 50
4 50 100
4 100 50
4 50 150
5 300 30
5 30 10

Thanks In Advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-02 : 13:22:34
Duplicate

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -