Home > database >  I want to achieve the goal of in the PB application data in A table appended to the B in the table f
I want to achieve the goal of in the PB application data in A table appended to the B in the table f

Time:10-01

I am in A small program, the PB program to achieve the goal of data in A table appended to the B in the table function to do? To add many times, is one to two table structure, database using SQL Server 2 k pb is 8.0, which places as friends, please tell, I thanked first here!! A beginner

CodePudding user response:

Add 1
I 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 pipeline

CodePudding 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 into

CodePudding user response:

Agree, use SQL statements to realize fast, SELECT title_id, title, type, pub_id
The FROM titles can be added to the where condition
  • Related