CodePudding user response:
Add 1I used to INSERT INTO archivetitles
(title_id, title, type, pub_id)
The SELECT title_id, title, type, pub_id
The FROM titles
In table B is empty can put A table of contents copied to all B in the table, but I want to realize the function of the multiple copy data in A table to the B table, achieve the effect of additional!
CodePudding user response:
Data pipelineCodePudding user response:
What's the use!Process is the same, is to make A copy of each table A primary health to change, or table B will be the main health repeat!
Built two DW, DW_a DW_b
Int I, rows
Dw_a. Settransobject (sqlca)
Dw_b. Settransobject (sqlca)
Rows=dw_a. Retrieve ()
For I=1 to rows
Dw_a. Object.//id=new [I] value table of A main sound all change to A new value
Next
Dw_a. RowsCopy (1, rows, Primary! , dw_b, 1, Primary!
If dw_b. The update ()=1 then
commit;
End the if
Probably mean it
CodePudding user response:
The effect of the additional?The first goal is to effect or function?
If you would like to emphasize to the user operation effect, can adopt the method of L on,
If only function, had better use statement processing, high efficiency
CodePudding user response:
The final implementation are the conditions to insert intoCodePudding user response:
Agree, use SQL statements to realize fast, SELECT title_id, title, type, pub_idThe FROM titles can be added to the where condition