El Jeffo wrote:
>
> Here's an interesting philosophical question...
>
> Say I have a table with three columns, a b and c.
>
> a and b contain say the x and y coordinates for mass c.
>
> I want to get the mass c for 100 (x,y) points.
>
> Is there a better way than writing:
>
> select from table where (a = x1 and b = y1)
> or (a = x2 and b = y2)
> ...
> or (a = xn and b = yn)
>
> I suppose I should put indexes on a and b?
>
> Thanks for letting me borrow your brain.
>
> Jeff
Hi Jeff
You could generate a column x_y in your table and fill it with the concatenation of x and
y.
Then make an SELECT mass FROM table WHERE x_y IN (x1y1, x2y2, ...).
Tschau
Christian
PS: Sorry for the late answer, I was on vacation.