Обновить поле по like %
«ch1»: 0.0501
«ch2»: 0.0501
«zz_column»: «MedOC»
«ea_type_train»: «ZZ»
SELECT * FROM forex_rates.models_configs where `json` like ‘%»ea_type_train»: «ZZ»%’ AND `json` like ‘%»zz_column»: «MedOC»%’ AND `json` like ‘%»ch2″: 0.0501%’ AND `json` like ‘%»ch1»: 0.0501%’;
SELECT * FROM forex_rates.models_configs where `json` like ‘%»ea_type_train»: «ZZ»%’ AND `json` like ‘%»zz_column»: «MedOC»%’ AND `json` like ‘%»ch2″: 0.0501%’ AND `json` like ‘%»ch1»: 0.0501%’;
UPDATE forex_rates.models_configs SET `baseline_config_id` = 1 where `json` like ‘%»ea_type_train»: «ZZ»%’ AND `json` like ‘%»zz_column»: «MedOC»%’ AND `json` like ‘%»ch2″: 0.0501%’ AND `json` like ‘%»ch1»: 0.0501%’;
SELECT * FROM forex_rates.models_configs where `json` like ‘%»ea_type_train»: «ZZ»%’ AND `json` like ‘%»zz_column»: «MedOC»%’ AND `json` like ‘%»ch2″: 0.0501%’ AND `json` like ‘%»ch1″: 0.0501%’ AND (`json` like ‘%»symbol»: «EURUSD»%’ OR `symbol` like «EURUSD»);
UPDATE forex_rates.models_configs SET `baseline_config_id` = 3 where `json` like ‘%»ea_type_train»: «ZZ»%’ AND `json` like ‘%»zz_column»: «Med»%’ AND `json` like ‘%»ch2″: 0.0501%’ AND `json` like ‘%»ch1″: 0.0501%’ AND (`json` like ‘%»symbol»: «EURUSD»%’ OR `symbol` like «EURUSD»);
UPDATE forex_rates.models_configs SET `baseline_config_id` = 4 where `json` like ‘%»ea_type_train»: «ZZ»%’ AND `json` like ‘%»zz_column»: «MedOC»%’ AND `json` like ‘%»ch2″: 0.0501%’ AND `json` like ‘%»ch1″: 0.0501%’ AND (`json` like ‘%»symbol»: «EURUSD»%’ OR `symbol` like «EURUSD»);
UPDATE forex_rates.models_configs SET `baseline_config_id` = 0 WHERE `symbol` not like «EURUSD» AND `baseline_config_id` = 2;
SELECT * FROM forex_rates.models_configs WHERE `symbol` not like «EURUSD» AND `baseline_config_id` = 2;