Subject | complicated recursion or other option? |
---|---|
Author | Check_Mail |
Post date | 2017-04-27T14:05:43Z |
Hello,
in advance, many thanks!
I would like to combine all properties like this:
Property1 Property2 Property3 Property4..
IP54 Yellow With lamp 30W
IP20 Blue Without lamp 40W
Red 50W
60W
In the first step I would like get this:
IP54-Yellow-With lamp-30W
IP54-Yellow-With lamp-40W
…
IP54-Yellow-Without lamp-30W.
(in the next step, I would like to set Properties which are not possible, for example 60W is not possible if the Color is red)
For this, I have two tables:
Table A
ID Property (color could be value 1, lamp, IPXX, Watt..) integer
POS (in this sequence I would like to generatet he result) integer
ID itself, Integer, self generated.
Table B
ID itself auto generated integer
ID_Table A references to Table A
Property – (yellow, red..)
For example,
Table A
ID Property POS ID itself
1 (Color) 1 10
2(lamp) 2 11
3(Watt) 3 12
Table B
ID itself ID_Table_A Property
101 10 RED
102 10 BLUE
103 10 White
104 11 With Lamp
105 11 Without Lamp
105 12 30 Watt
105 12 40 Watt
105 12 50 Watt
Now I would get:
Red-With Lamp-30 Watt
Red-With Lamp-40 Watt
Red-With Lamp-50 Watt
Red-Without Lamp-30 Watt
Red-Without Lamp-40 Watt
Red-Without Lamp-50 Watt
Blue-With Lamp-30 Watt.. and so on
How can I realize with firebird?
Thank you.
Best regards
Olaf