I'm kind of at a loss as to how to formulate my question. Suppose I have two tables, temp0 and temp1. Temp0 contains a set of keys, and temp1 another, so:
Temp0
1
2
3
Temp1
a
b
c
I'm trying to work out a select that would result in this in a new table:
Temp2
key0 key1
1 a
1 b
1 c
2 a
2 b
2 c
3 a
3 b
3 c
I can't seem to work out how. I've tried using MERGE but can't quite set it up, as well as various other experiments. I could use a cursor but I just have the feeing there's a purely set-based solution that's eluding me. Is there?
TIA
An unforeseen consequence of the information revolution has been the exponential propagation of human error.
Temp0
1
2
3
Temp1
a
b
c
I'm trying to work out a select that would result in this in a new table:
Temp2
key0 key1
1 a
1 b
1 c
2 a
2 b
2 c
3 a
3 b
3 c
I can't seem to work out how. I've tried using MERGE but can't quite set it up, as well as various other experiments. I could use a cursor but I just have the feeing there's a purely set-based solution that's eluding me. Is there?
TIA
An unforeseen consequence of the information revolution has been the exponential propagation of human error.