Home > database >  Update the fuzzy matching a single field and add the corresponding information
Update the fuzzy matching a single field and add the corresponding information

Time:10-19





below can only be queried yqbm. Matching color field information, but I need to Update the information, the fuzzy matching to the yqbm. The matching the color field, fill in the corresponding yqbm. The new technology of coding to CSV. The matching color column, how to write,,,,,,,



 SELECT count (distinct CSV. Bar code), CSV, contract number, CSV. Long, CSV. Wide, CSV, barcode, CSV, material color, yqbm. New technology of coding, yqbm. A new name, yqbm. Material name, yqbm. Coding, new paint yqbm. Curing agent, yqbm. The ratio of curing agent, yqbm. The ratio of diluent, yqbm. Thinner 
The FROM CSV
The JOIN yqbm
ON 1=1
WHERE the CSV.
material colorLIKE CONCAT (' % ', yqbm. Matching color fields, '%')
Group by CSV. Barcode

CodePudding user response:

You can try
The update CSV set xx=(select... )

CodePudding user response:

You can try:
Update CSV a inner join yqbm b on a. material color=b. matching color field set a. matching color=b. new process coding;

CodePudding user response:

UPDATE CSV a, yqbm b SET a. matching color=b. WHERE a. new technology of coding material color LIKE CONCAT (' % ', b. matching color fields, '%');
  • Related