Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

select from dual into a variable through db links

695836Aug 27 2009 — edited Aug 31 2009
HI,I need to select value of current_timestamp in to a variable d1 of a remote database inside function.

function (db_lnk varchar2)return number
as
dbl varchar2(10);
begin
dbl:=db_lnk;
select current_timestamp into d1 from dual@dbl;
....
...
end;
but getting error table or v iew does not exist.
if i do
select current_timestamp into d1 from dual@'||dbl||';
then it says database link name expected.

How to achieve this?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 28 2009
Added on Aug 27 2009
32 comments
4,462 views