There are 3 tables:
Label (Label_ID,Label_Name)
, Label_ID is Primary Key.Tracks (Prefix, Label_ID)
, Prefix is Primary Key,Label_ID is empty columnTop100 (Prefix,Label)
No keys in this table.
My query should be such that , For each prefix
row in Tracks table, find an equivalent prefix
in top100 table then select Label
from top100 table, Match thus selected Label
with Label_name
in Label table, get its Label_ID
and Update its value in Tracks table.
Can anyone please help me with this query?? Any help much appreciated
Tracks.prefix
) a new row to be inserted or the existing row to be updated?