Innov-AI
    Documentation | MentDB Weak Server
Parse a CSV file and integrate row into a SQL Database

  • try {
    
    	sql connect "session1" {cm get "demo_cm_mysql";};
    
    	csv parse (mql "T") (mql "/Users/jimmitry/Desktop/file.csv") (mql ",") (mql "'") (mql "A,B,C") {
    	
    		sql dml "session1" (concat "insert into products (id, name, quantity) values (" (sql encode [T_A]) ", " (sql encode [T_B]) ", " (sql encode [T_C]) ");");
    	
    	};
    
    	sql disconnect "session1";
    
    } {
    
    	try {sql disconnect "session1";} {} "[err]";
    
    } "[err]";
Services     Supporters     Contact     About     Legal notice © 2024