Database Link Insert with Function [message #399573] |
Thu, 23 April 2009 01:21  |
sysman2007
Messages: 24 Registered: March 2009
|
Junior Member |
|
|
Hi
I want insert data from 2 tables to another table on other database.
I use this code to insert my data but I get error:
ORA-04054: database link SALES.ISACO.IR does not exist
ORA-02063: preceding line from SAMAND
when I change function "co_fnc_cur_date" to
TO_CHAR(SYSDATE,'YYYY/MM/DD')
then I can insert data to another table.
insert into tbl_fnv_ins@samand(itemno,itemnoname,itemnostate,upddate, itemnounit)
select wgdm_gdm, wgdm_far_des, wgdm_act_flg,co_fnc_cur_date,wgdm_gume_ume from wgdhs,wgdms
where wgdm_wgds_gds = wgdh_wgds_gds
and wgdh_far_des is not null
Why I can't use function in insert command?
|
|
|
|
|
Re: Database Link Insert with Function [message #399578 is a reply to message #399575] |
Thu, 23 April 2009 01:28  |
sysman2007
Messages: 24 Registered: March 2009
|
Junior Member |
|
|
Frank wrote on Thu, 23 April 2009 01:25 | Because the function at the other end refers to a non-existing database link.
Your problem is not that you cannot use your function, but that that function itself has a problem.
|
Why?
I can use that function without any problem in select from dual;
|
|
|