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 |
ino mart
Starting Member
12 Posts |
Posted - 2014-08-29 : 06:47:06
|
AllI need to filter out all records where the value is less than 100 + all other records of the affected person (regardless the value). Let's assume I have next tableJoe 500Joe 200Joe 150John 50John 99Betty 101Betty 199Liz 89Liz 102Brad 87Brad 888My SQL-string must return next recordsJohn 50John 99Liz 89Liz 102Brad 87Brad 888Betty and Joe are not returned as all their values are higher than 100.How can this be done?RegardsIno |
|
djj55
Constraint Violating Yak Guru
352 Posts |
Posted - 2014-08-29 : 07:25:49
|
Try a cte to find name that has < 100 then use that to get your result.djj |
|
|
|
|
|