Re: constructing a sql query
This worked well, thank you
"que" <varyform@gmail .comwrote in message
news:1165935530 .020272.181310@ 80g2000cwy.goog legroups.com...
This worked well, thank you
"que" <varyform@gmail .comwrote in message
news:1165935530 .020272.181310@ 80g2000cwy.goog legroups.com...
other, little bit tricky solution :)
>
select DelegateID, count(DelegateI D) c from your_table where QuestionID
in (1, 7)
group by DelegateID
having c=2
c=2 -- 2 - params count inside in()
>
eg: where QuestionID in (1, 2, 3, 4, 5) -- c=5
>
PS: one requirement - pair delegate-question must be uniq
>
>
select DelegateID, count(DelegateI D) c from your_table where QuestionID
in (1, 7)
group by DelegateID
having c=2
c=2 -- 2 - params count inside in()
>
eg: where QuestionID in (1, 2, 3, 4, 5) -- c=5
>
PS: one requirement - pair delegate-question must be uniq
>
Comment