shuzheng
4th April 2006, 10:43
hi, everybody:
I want to copy data in a table to another table ,this two table is in the same company ;
If I user ttaad4226m000 and ttaad4227m000, It can only export/import data in the same table,can not effect the target table;:mad:
And I want to relize it in job;
who can help me ,thanks!
victor_cleto
4th April 2006, 10:52
DO NOT CROSS-POST. Read the rules of the board.
bdittmar
4th April 2006, 14:03
hi, everybody:
I want to copy data in a table to another table ,this two table is in the same company ;
If I user ttaad4226m000 and ttaad4227m000, It can only export/import data in the same table,can not effect the target table;:mad:
And I want to relize it in job;
who can help me ,thanks!
Hello,
write an update session:
select records in sourcetable -> insert records in target table !
Regards
i96nds
4th April 2006, 15:58
I tried to do this in ERP-LN 6.1:
- a new empty table - tditc907 - with the same structure as tdpur401.
select tdpur401.*
from tdpur401
selectdo
rcd.ttditc907 = rcd.ttdpur401
db.insert (ttditc907, db.retry )
commit.transaction()
endselect
It is compiled OK.
But I get an error message - error 205 - out of range - when executing this script. It is quite strange. I can tell you that the record buffer of the target table is not updated properly by the line "rcd.ttditc907 = rcd.ttdpur401".
I had to use the debugger to see this.
I am sure that this was OK in BaanIV. Should it not work in ERP LN???
bdittmar
4th April 2006, 16:53
Hello,
i wonder, why two identical tables ?
Do some more coding, an all will be fine.
select table.a.*
from table.a
where ??????
selectdo
a = table.a.field.a
b = table.a.field.b
..............
update_table.b()
endselect
function update_table.b()
{
db.retry.point()
select table.b.*
from table.b for update
where ????????
selectdo
table.b.field.a = a
table.b.field.b = b
...................
db.update(ttable.b,db.retry)
commit.transaction()
selectempty
table.b.field.a = a
table.b.field.b = b
...................
db.insert(ttable.b,db.retry)
commit.transaction()
endselect
commit.transaction()
}
mark_h
4th April 2006, 16:58
I am sure that this was OK in BaanIV. Should it not work in ERP LN???
Not exactly true. Using the record buffer can be kind of tricky. I have run into a couple of issues with this. I would recommend using all the table fields in this case - prevents you from having to worry about the "_" fields.
ecoman68
4th April 2006, 19:14
Hi,
if you don't want to programm, than you can also go this way:
1) Copy the table definitions at ttadv4120m000 to a new one.
2) Convert it to runtime and create the new table.
The following is for your job:
3) Create a sequential dump of the source table (ttaad4226m000) with "Specify Field Separators".
4) Rename the dumpfile with "ttaad5205m000" (i.e.: ttiitm001901.S -> ttiitm999901.S).
5) Import the dump with "ttaad4227m000" with "Specify Field Separators".
Hope this helps... :)
Cu,
Ecoman68 :D
shuzheng
7th April 2006, 10:37
thanks !
I have relized it by programming!
thank you ,Ecoman68 ,what you told is a good idea!