============================================================phil-prod-20141212, field add "-00" =========
It is necessary to modify the data of the online advance treasure data and the easy loan related problem data (batch)
Mongodb
Bindingloan
Need to add '-00 ' to Loanaccountid
MySQL requires the Select Loanaccountid from kypayaccounts
Loanaccountid no-00 record plus '-00 '
=========================mongo======db.bindingloan.find ({},{"Loanaccountid": 1}). Pretty ()
Db.bindingloan.find ({"Loanaccountid": {$not:/\-00$/}},{"Loanaccountid": 1}). Pretty ()
Mongodump--host localhost--port 27020-uquery-pquery-d che001-c bindingloan-o./mongorestore--drop--host Localh OST--port 27017-uplatform-pplatform-d che001-c Bindingloan Bindingloan.bson
var userf=db.bindingloan.find ({"Loanaccountid": {$not:/\-00$/}},{"Loanaccountid": 1}); while (Userf.hasnext ()) {var Userft=userf.next (); var useid=userft._id;var uname=userft.loanaccountid;var usename=uname+ "-00"; Db.bindingloan.save ({"_id": Useid, "Loanaccountid": Usename}) print (usename);}
=========================mysql======
mysqldump-uquery-pquery-h172.24.0.220--lock-tables=false--single-transaction--default-character-set=utf8-- Set-gtid-purged=off che001 kypayaccounts> Kypayaccounts.sql
SELECT CONCAT (Loanaccountid, ' -00 ') from kypayaccounts WHERE Loanaccountid are not NULL and loanaccountid do like '%-00 ';
UPDATE kypayaccounts SET loanaccountid=concat (loanaccountid, ' -00 ') WHERE Loanaccountid is isn't NULL and Loanaccountid not Like '%-00 ';
Mongo/mysql, field add "-00"