1, the MySQL stored procedure, can realize the dynamic table reads, satisfies the more complex business logic
DROP PROCEDURE if existsP_get_car_trace;delimiter//CREATE PROCEDUREp_get_car_trace ()beginDeclareVar_sqlvarchar( -);DeclareVar_tabe_namevarchar( -);SetVar_tabe_name= 'geom1';SetVar_sql=Concat_ws (' ','Select Id,astext (GEO) Geo from', var_tabe_name);Set @sql =Var_sql;PREPARES1 from @sql; EXECUTES1;deallocate PrepareS1;End //delimiter;
2, SQL Server stored procedures, using the steps of the execution of SQL statements, implementation of data line by row calls
Create proc p_ins_test (@idint,@geonvarchar(max)) as begin Insert into t_test (Id,geo) Values (@id,@geo); End
3, extraction process flow chart:
Table Input:
Executes the SQL statement step, passing the value of the previous step with a parameter
Use kettle to read data from MySQL using stored procedures to SQL Server database