Subject | Trouble with select |
---|---|
Author | raistware |
Post date | 2012-02-08T15:46:56Z |
Hi
Im trying a bit difficult select:
select id, value
from MyTable
where id in (1, 1, 1, 2, 3, 3, 4)
I want that fore every value inside IN a row is output, so for example this would result something like:
1 | 40
1 | 40
1 | 40
2 | 21
3 | 23
3 | 23
4 | 87
But now I don't take duplicates, result is
1 | 40
2 | 21
3 | 23
4 | 87
Can someone help me to create that tricky select?
Many thanks in advance
Im trying a bit difficult select:
select id, value
from MyTable
where id in (1, 1, 1, 2, 3, 3, 4)
I want that fore every value inside IN a row is output, so for example this would result something like:
1 | 40
1 | 40
1 | 40
2 | 21
3 | 23
3 | 23
4 | 87
But now I don't take duplicates, result is
1 | 40
2 | 21
3 | 23
4 | 87
Can someone help me to create that tricky select?
Many thanks in advance