|
jim_jim
Constraint Violating Yak Guru
USA
277 Posts |
Posted - 09/25/2012 : 14:19:19
|
I am trying to write a select statement to get all requests from a table customerinfo where count of the reqno is greater than 1 and in every unique reqno there should be atleaset one reportid with an Id 1873 and the other reportids can be anything between (456,457,458,459,460)
Iam not sure how i put sql together for the above but the sample data will look like this
Reqno ReportId 111111 1873 111111 460 111111 457 222222 1873 222222 456 333333 456 333333 1873 333333 460 333333 459
Thanks |
|