Home » SQL & PL/SQL » SQL & PL/SQL » INSERT: inserting huge data using '&' in Oracle 9i
icon7.gif  INSERT: inserting huge data using '&' in Oracle 9i [message #218678] Fri, 09 February 2007 04:56 Go to next message
suzane
Messages: 6
Registered: February 2007
Location: Mumbai
Junior Member
Hi,

I'm a beginner. I wud APPRECIATE if someone help me RESOLVE my queries. As mentioned in the headline of the topic, I have a problem in executing ' insert' for huge data using '&'.

Syntax :
> insert into emp values (&E_no,'&E_name','&Job',&Sal);

till this syntax everything was fine and i was able to enter values for one row. BUT, after that I didn't find any request by SQL,for the second set of entries to be made.

Can you suggest me what SQL command has to be used to proceed with inserting entries. I tried using Sthng '>set verify off' (Donno what it is..!?), but it was invalid.

I wud be VERY Thankful to you,

Regards,
Suzane.
Re: INSERT: inserting huge data using '&' in Oracle 9i [message #218682 is a reply to message #218678] Fri, 09 February 2007 05:08 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
At the SQL*Plus prompt, enter slash / and press <Enter>. This will require you to enter new values.
SQL> create table tst (id number, name varchar2(20));

Table created.

SQL> insert into tst values (&id, '&name');
Enter value for id: 1
Enter value for name: Littlefoot
old   1: insert into tst values (&id, '&name')
new   1: insert into tst values (1, 'Littlefoot')

1 row created.

SQL> /
Enter value for id: 2
Enter value for name: Suzane
old   1: insert into tst values (&id, '&name')
new   1: insert into tst values (2, 'Suzane')

1 row created.

SQL> select * from tst;

        ID NAME
---------- --------------------
         1 Littlefoot
         2 Suzane

SQL>


[EDIT] Added a live example.

[Updated on: Fri, 09 February 2007 05:10]

Report message to a moderator

icon7.gif  Re: INSERT: inserting huge data using '&' in Oracle 9i [message #218689 is a reply to message #218682] Fri, 09 February 2007 05:42 Go to previous message
suzane
Messages: 6
Registered: February 2007
Location: Mumbai
Junior Member
Hey...Thanks to you. That example really helped me. It worked.

Want to ask you one more query. In the example given by you the datatype of id column is 'number',where no width has been specified,still the table has been created.
BUT, I was told, where there is no default width existing for a particular datatype, it is a Must, we specify the width. For Eg,'char' has got default size but varchar2 do not,so we have to specify the width.

Can you please make it clear for me...

Thanks,
Suzane
Previous Topic: CTL File input parameters
Next Topic: Help with linking tables and grouping values into columns
Goto Forum:
  


Current Time: Thu Dec 08 16:29:20 CST 2016

Total time taken to generate the page: 0.08509 seconds