Interacting with VBA is not easy for Python to write, make a very simple function that has an update on it, without inserting a table.
It's a navicat tool.
Parameters:
In Yahoo_code varchar (+), in Begin_date char (Ten), in End_date char (10)
Function Contents:
BEGIN
DECLARE Stockarea VARCHAR (20);
Select B.marketname into @stockArea from Instruments a left JOIN in the A.marketid = B.marketid where A.yahoocode=co Nvert (Yahoo_code USING UTF8) COLLATE utf8_unicode_ci;
#set @stockArea = "China";
Set @stockArea =concat ("Histprices", @stockArea);
Set @STMT: = CONCAT ("Select A.* from", @stockArea, "a left JOIN Instruments B on A.instrumentid=b.instrumentid where B.ya Hoocode=convert (' ", Yahoo_code, ' USING UTF8) COLLATE utf8_unicode_ci and A.tradedate >= '", Begin_date, "' and A.tradedate <= ' ", end_date," ' ");
PREPARE STMT from @STMT;
EXECUTE STMT;
END
MySQL Custom function