Re: inserting from record.

Re: inserting from record.

 

  



set echo off
set feedback off
set heading off
set pagesize 0
set timing off
set trimspool on
set verify off
spool create_records.sql
select 'insert into table2 values ('
||''''||table1_col||''''||', ' ||''''||'table1_col'||''''||','
||''''||'table1_col'||''''||',' ||chr(10)
||''''||'table1_col'||''''||','||chr(10)
|| ''''||'table1_col'||''''||',' ||''''||'N'||''''||',sysdate);'
from table1 ;
spool off
exit

>Hi guys,
> I have got a record of around 100 fields based on a table columns. I
>have to insert record rows into the table. I know with individual fields I
>can insert into table. But as there are 100s of fields that is bit
>cumbersome eg.
>while 'SELECT'ing I used select * into rec from table;
>but similarly I can't use insert into table values(rec.* or select * from
>rec etc) ..
>
>any suggestions.
>
>--------
>Oracle documentation is here:
>http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
>To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
>Tell yer mates about http://www.farAwayJobs.com
>By using this list you agree to these terms:http://www.lazydba.com/legal.html





>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<
April Sims MCSE, CNE Abilene Christian University
OCP 8i DBA ACU Box 29005
Information Technology Abilene, TX 79699
[Email Address Removed] Vx:(915)674-2681 Fx:674-6724
>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<


Oracle LazyDBA home page