Hi,
I'm confused how to solve this:
Using UPDATE, MERGE, table-valued UDF or what?:w00t:
I know using a cursor is possible but there are disadvantages...
tblA
colA1 colA2 colA3
=======================
C 15 NULL
D 17 NULL
G 18 NULL
L 19 NULL
R 20 NULL
tblB (the lookup table)
colB1 colB2 col3
=======================
28 15 1
34 17 1
35 18 1
36 18 0
37 18 0
42 19 1
43 20 0
44 20 1
To do:
Find in tblB the lines with col3 = 1 (exists only once for same colB2-value),
Then UPDATE tblA colA3 with value colB1. RI exists on colB2 = colA2
--
candide
________Panta rhei