Path: news.easynews.com!easynews!cyclone.swbell.net!cyclone-sf.pbi.net!128.32.206.55!newsfeed.berkeley.edu!ucberkeley!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!ool-43532939.dyn.optonline.NET!not-for-mail
From: "John Doe" <john@doe.com>
Newsgroups: comp.databases.oracle.server
Subject: Inserting PL/SQL records into a table
Date: Sun, 7 Jul 2002 20:04:08 -0400
Lines: 30
Message-ID: <agal23$k4fc2$1@ID-80970.news.dfncis.de>
NNTP-Posting-Host: ool-43532939.dyn.optonline.net (67.83.41.57)
X-Trace: fu-berlin.de 1026086789 21118338 67.83.41.57 (16 [80970])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Xref: easynews comp.databases.oracle.server:153331
X-Received-Date: Sun, 07 Jul 2002 17:03:50 MST (news.easynews.com)

I can do

my_rec my_table%ROWTYPE;

and

select * into my_rec from my_table where rownum<2;

But I cant do

insert into my_table values (my_rec);

This is a bummer.

I want to write a dynamic procedure that takes

rec_insert(table_name_in, record_name_in)

and this procedure would query ALL_TAB_COLUMNS to get all the column names
for the table and construct the appropriate INSERT statement for EXECUTE
IMMEDIATE.

The problem is that the record_name_in IN parameter would be a different
%ROWTYPE variable depending  on the table_name_in IN parameter.

How can I do this?

Thanks for any help


