List:General Discussion« Previous MessageNext Message »
From:boris hajduk Date:November 17 2001 10:18pm
Subject:Re: many similar requests -> 1 request
View as plain text  
Saturday, November 17, Bruce Ferrell wrote:

BF> SELECT position, title FROM WHERE position1 IN (1...200) OR position2 IN
BF> (1...200);


no, i wasn't clear enough, let's try it again.

the table book contains :

|-- title -----|--position1--|--position2--|--lots of other fields---
| bravenewworld|          0  |             |
| foundation   |          1  |             |
| shortstories |          2  |          3  |
| neuromancer  |          4  |          7  |
| hyperion     |          8  |          6  |
| salem        |          5  |             |
| lovedeath    |         11  |          9  |

the table could grow further than 200 elements

i want to design a sql request than returns :

|--position--|--- title -----|
|         0  | bravenewworl  |
|         1  | foundation    |
|         2  | shortstories  |
|         3  | shortstories  |
|         4  | neuromancer   |
|         5  | salem         |
|         6  | hyperion      |
|         7  | neuromancer   |
|         8  | hyperion      |
|         9  | lovedeath     |
|         11 | lovedeath     |

Thread
many similar requests -> 1 requestboris hajduk17 Nov
  • Re: many similar requests -> 1 requestBruce Ferrell17 Nov
    • Re: many similar requests -> 1 requestboris hajduk17 Nov
      • Re: many similar requests -> 1 requestSergei Golubchik17 Nov
        • Re: many similar requests -> 1 requestSergei Golubchik17 Nov
          • Re: many similar requests -> 1 requestboris hajduk18 Nov
            • Re: many similar requests -> 1 requestSergei Golubchik18 Nov
              • Re[2]: many similar requests -> 1 requestboris hajduk18 Nov
Re: many similar requests -> 1 requestAnvar Hussain K.M.19 Nov