Modified ColorCode-byConsanguinity

Quote from kevync on 2022-08-19, 1:22 pmI modified the ColorCode byConsanguinity originally written by Tom Holden.
You could adapt the colors to you preference. I wanted to adapt the code so it did not overwrite certain colors (for me it was was Red, Orange, Yellow, Green, Silver).
Essentially I modified two lines -- I added a WHERE on the UPDATE statement (WHERE COLOR <> 9 or COLOR <> 1 or COLOR <> 21 or COLOR <> 5 or COLOR <> 7 )
also on the UPDATE SET Subquery I added only if color was = 0
WHERE Relate1 < 999 and Color=0
Attached in the SQL code
Kevin
I modified the ColorCode byConsanguinity originally written by Tom Holden.
You could adapt the colors to you preference. I wanted to adapt the code so it did not overwrite certain colors (for me it was was Red, Orange, Yellow, Green, Silver).
Essentially I modified two lines -- I added a WHERE on the UPDATE statement (WHERE COLOR <> 9 or COLOR <> 1 or COLOR <> 21 or COLOR <> 5 or COLOR <> 7 )
also on the UPDATE SET Subquery I added only if color was = 0
WHERE Relate1 < 999 and Color=0
Attached in the SQL code
Kevin
Uploaded files: