Re: [SQL] need query advice

2004-10-19 Thread Pierre-Frédéric Caillaud
argh, you could use contribs/intarray with a gist index... instead of N columns use an integer[] and gist-index it, then write the equivalent of : where (intersection of the search array with the data array) has at least 5 elements (or 4 elements) (or at least 4 elements order by

[SQL] need query advice

2004-10-19 Thread Stephan Fiebrandt
Hello all, i've got a psql database, with a table including 6 rows named "zahl1 zahl2 zahl3 zahl4 zahl5 and zahl6" type integer There are about 10.000 entries in the table. In every entry, the numbers are uniq to each other. That means, if zahl1=1, then zahl2-6 cannot be also 1. Example: 1, 1