Let’s Connect

Ask me a question and I shall try to reach you as soon as possible




One thought on “Let’s Connect

  1. here is my problem in detail:

    I have table test_table.

    create table test_table1 (a number primary key, b number, c number);

    I have the below function in a remote DB. This function is fetching a record from test_table and returning this to calling program.

    create or replace function gettesttablerec(p_a number)
    return test_table%rowtype is
    v_testtablerec test_table%rowtype;
    select *
    into v_testtablerec
    from test_table
    where a = p_a;
    when others then
    return v_testtablerec;

    I have below procedure here in my DB. Where I am trying to call above function from remote DB (through DB link) and insert the same record in another table with same structure. I have written below procedure but giving me some compilation issue. Probably I have never tried such things before so dont have idea about the proper syntax of that.

    create or replace procedure insertintonewtable(p_a number) is
    v_testtablerec test_table%rowtype;
    execute immediate ‘begin :RETVAL := gettesttablerec(:1)@; end;’
    using IN p_a, OUT v_testtablerec;

    insert into test_table1
    values v_testtablerec;

    I hope above info would be sufficient to answer my question, if you you still feel that this not enough please do let me know.

    Bold part is the problematic area.

    Posted by Peeush | April 2, 2012, 7:40 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Saurabh K. Gupta

Saurabh K. Gupta

Database Enthusiast, Author, Speaker and blogger

View Full Profile →

Twitter Profile

Advanced Oracle PL/SQL Developer’s Guide – Second Edition

Advanced Oracle PL/SQL Developer's Guide - Second Edition

Oracle Advanced PL/SQL Developer Professional Guide

Oracle Advanced PL/SQL Developer Professional Guide


SBHOracle is an independent blog and all the posts are based on my self experience and hands on with the technologies. It shares no relations with any of my current projects or from those in the past.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 784 other followers

SbhOracle Blog stats

  • 78,768 hits
Aggregated by OraNA
%d bloggers like this: