Hello,
I am trying to make a calculation on two tables:
Table # 1
---------
#words (Word varchar, A float, B float, C float,.. Z float)
Table # 2
---------
#input_word
#input_word table has a subset of the columns (A .. Z)
Example:
#words
Word---A---B---C--...E.....S....T....... X Y Z
---------------------------------------------
Test----------------.25---.25--.50
Cat---.33-----.33--------------.33
Bays--.25-.25-------------.25-------------.25
#input_word: aword
A D O R W
------------------
.2 .2 .2 .2 .2
I am trying to join #input_word and #words
such that the MIN value of the two columns is in the output set
For the above example, output would be:
Word A D O R W
------------------------
TEST 0 0 0 0 0
CAT .2 0 0 0 0
BAYS .2 0 0 0 0
The recordset takes the columns of #input_word and then taken the value as the MIN of #input_word or #words
I have implemented this query in a while loop, but it is extremely slow. I am looking for an optimized way to get the above calculation done.
I am trying to make a calculation on two tables:
Table # 1
---------
#words (Word varchar, A float, B float, C float,.. Z float)
Table # 2
---------
#input_word
#input_word table has a subset of the columns (A .. Z)
Example:
#words
Word---A---B---C--...E.....S....T....... X Y Z
---------------------------------------------
Test----------------.25---.25--.50
Cat---.33-----.33--------------.33
Bays--.25-.25-------------.25-------------.25
#input_word: aword
A D O R W
------------------
.2 .2 .2 .2 .2
I am trying to join #input_word and #words
such that the MIN value of the two columns is in the output set
For the above example, output would be:
Word A D O R W
------------------------
TEST 0 0 0 0 0
CAT .2 0 0 0 0
BAYS .2 0 0 0 0
The recordset takes the columns of #input_word and then taken the value as the MIN of #input_word or #words
I have implemented this query in a while loop, but it is extremely slow. I am looking for an optimized way to get the above calculation done.