Thanks April.
My table actually contains around 100s of columns. And to avoid typing names
of every individual column I was wondering whether I can use '*' somehow
just as in select stat. to insert into a table.
cheers
> -----Original Message-----
> From: April Sims [SMTP:[Email Address Removed] Sent: Thursday, May 31, 2001 4:35 PM
> To: yogesh.[Email Address Removed] [Email Address Removed] Subject: 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] >To subscribe: send a blank email to oracledba-[Email Address Removed] >Visit 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