p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Oracle (http://p2p.wrox.com/forumdisplay.php?f=105)
-   -   insert multiple records into a table from values (http://p2p.wrox.com/showthread.php?t=40491)

Deepak Chauhan March 28th, 2006 06:18 PM

insert multiple records into a table from values
Hi All,

I've quite a strange requirement to insert multiple records into a table.
I have some numbers say 14,32,3,5,7,811,43,45 which i want be inserted into a table T1 with one column N1

but i want all these values to be inserted as different records records in one go without using any looping .

I know this can be done using the INSERT ... SELECT ... Statements.
or slightly different way.

But not sure on how exactly it can be done.

On a slightly different requirement I want a way to get these values in the form of records without using any table.

I mean i need a select statement on the values 1,3,65,22,65,77,33

something like Select * from (1,3,65,22,65,77,33)

and the result be displayed in the form

(No Column Name)

Is it possible.

I know some experts out there can help me do these things.

I will appreciate any help on this

Deepak Chauhan

milind.paralkar March 30th, 2006 06:05 AM

Alternative to table..
           try using PL/SQL table.

ashu_from_india May 12th, 2006 10:34 PM

try this

INSERT INTO Table1 SELECT Table2.Column1 FROM Table2

Ashu :-)

ashu_from_india May 12th, 2006 10:35 PM

u can also use WHERE clause on Table2

All times are GMT -4. The time now is 01:16 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.