sql - Need a query to find the records that have different values for same id in multiple rows -


i confused here.

i need find custtreenodeid's have (preferenceid = 55 , overridevalue = 1 ), (preferenceid = 56 , overridevalue = 1),(preferenceid = 58 , overridevalue not null).

the record should have 3 preferenceid , should statisfy 3 conditions mentioned above.

example - see custtreenodeid = 76853551-7acd-48e1-beff-0000498a144c in screenshot.

this table

these gives custtreenodepreferenceoverrideid need

select custtreenodepreferenceoverrideid   yourtable  ( condition 1 ) or     ( condition 2 ) or     ( condition 3 ) group custtreenodepreferenceoverrideid having count(*) = 3 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Python Tornado package error when running server -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -