Subject | Re: [firebird-support] Trouble with select |
---|---|
Author | Helen Borrie |
Post date | 2012-02-08T21:47:12Z |
At 04:46 AM 9/02/2012, raistware wrote:
where id between 1 and 4
?
./heLen
>HiWhich is a correct result. The IN() predicate resolves to a series of ORs so, logically, it is the only possible result.
>
>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?Why not just
where id between 1 and 4
?
./heLen