How to insert 65k row in a table.??
I have 65 K id ( just ID) and I want to insert in to a table AA.
create table aa(
id number(10);
Now I just need to insert 65K id(just ID) in this table.
PLease help me out gurus..
thanks
insert into aa values(1269336);
insert into aa values(1273101);
insert into aa values(1260421);
insert into aa values(1262263);
insert into aa values(1254756);
insert into aa values(1251287);
insert into aa values(1249599);
insert into aa values(1272115);
insert into aa values(1273982);
insert into aa values(1255780);
insert into aa values(1244052);
insert into aa values(1279931);
insert into aa values(1263455);
insert into aa values(1256051);
insert into aa values(1270972);
insert into aa values(1254050);
insert into aa values(1262467);
insert into aa values(1256527);
insert into aa values(1249951);
insert into aa values(1272999);
insert into aa values(1255587);
insert into aa values(1246742);
insert into aa values(1258728);
insert into aa values(1250616);
insert into aa values(1260479);
insert into aa values(1294275);
insert into aa values(1251756);
Similar Messages
-
How to insert a row in Tree table which is dragged from the table?
Hi All,
I am having a Tree table and a Table in the same page, like below
Treetable Table
Item1 Subitem12
Subitem1 Subitem13
Subitem2 Subitem14
Subitem3 Subitem15
Subitem4 Subitem16
Item2 Subitem17
Subitem5 Subitem18
Subitem6 Subitem19
Subitem7 Subitem20
Subitem8 Subitem21
Item3
Subitem9
Subitem10
Subitem11
The requirement is i need to "drag" a row from the Table and place it under any parent node in the Tree table.
What i have done is I make the Tree table as ".ui-sortable" and table as a "draggable".
I am not able to find the position of the dragged item when i dropped it in the Treetable.
Please provide me a solution.
Regards,
AravindhHello:
Do you mean setting the selectedRowKeys in the setter method of the treeTable in the Request Scoped Managed Bean?
If that is what you mean, I tried that and there was no change in behavior. (Still does not highlight the correct row in the tree table upon execution of the next method for the bindings) Does anyone have any sample code they can provide that works?
Thanks for the help. -
How to insert multiple rows in same table at once
hi ,
How can I insert more than one row in the same database table on single submit button.
(i am using the ADF , EJB and Toplink for this example.)
EMPLOYEEand DEPARTMENT tables will hold a common coloum deptno
The method I have tried is as follows.
I have created the UI that holds EMPLOYEE(DETAIL) details and a DEPARTMENT(MASTER) table and I have created two separate bean classes which hold the getters and setters for the corresponding tables.
I have created a method in Department bean which will be called when we add the employee details
public String addEmpdetails() {
this.employeedetailslist.add(empdetails);
return null;
where employeedetailslist is a Arraylist and I want to pass the reference of employeebean in the array list.
But this method will fail as I need to create the new employee bean object every time when ever I need to pass.
How can I store values of multiple rows in bean.
In the EJB session bean how can I commit multiple EMPLOYEE rows and DEPARTMENT values at once.The use of &variable in a script is actually syntax for a "substitution variable" in the SQL*Plus tool (other tools may also do the same), not an inherent part of SQL or PL/SQL itself.
Whenever SQL*Plus is given a script it parses through it and if it encounters one of these it prompts for a value. This value is then substituted into the script before the script actually get's sent to the SQL or PL/SQL engine (process) on the database server. Once the script has gone to the database server it executes there and the results are passed back for SQL*Plus to display. However, the SQL and PL/SQL processes on the database server have no way to interface to the client machine, so they themselves cannot prompt for input from the client and you can't expect to prompt inside a loop as you are doing.
What you need is a user interface on the client that can prompt repeatedly for values and then re-send the script, or call a procedure on the database each time. This can be done using shell scripts or dos batch files (depending on your client being unix/dos based) or using a front end application tool such as Java, .NET, Powerbuilder, PHP, Application Express (APEX) etc. -
Inserting multiple rows in child table
i have two entity beans (main and child) with relationship one to many .... when i insert one row in main table (ie when i make one object for main entity bean)... how to insert multiple rows in child table...
Can anyone pls provide some sample code for the above.. how to pass a collection and populate it in the child table.
1.Where to pass the collection, to the childbean directly or to the parent bean and then itereate to the collectio and create child bean.
Much obliged if you could paste some code for the above.. -
How to identify date & time of insertion of rows in a table
Hi,
Is it possible to identify the date & time of insertion of rows in a table?
for example:
Table name: emp
I have rows like this
emp_code name dept
pr01 ram edp
ac05 gowri civil
pr02 sam pro
i want to know the date and time of the insertion this( ac05 gowri civil).
Could you please help me.....
Thanks in advance....psram wrote:
sorry for the confusion. I dont want to store date and time. I said that for example only.
I have table which consists of thousands of rows. I want to know the insertion date & time of a particular row.
Is it possible?So, if I have a table that stores a load of employee numbers, do you think I could get the database to tell me their names?
If you don't store the information, you can't query the information.
Ok, there are some dribbs and drabbs of information available from the back end of the database via the SCN's, Archive Logs etc., but those sort of things disappear or get overwritten as time goes by. The only way to know the information it to ensure you store it in the first place.
So, in answer to your question, No, there isn't a true and reliable way to get the data/time that rows were inserted into the table, unless you have chosen to store it alongside the data. -
Error inserting a row into a table with identity column using cfgrid on change
I got an error on trying to insert a row into a table with identity column using cfgrid on change see below
also i would like to use cfstoreproc instead of cfquery but which argument i need to pass and how to use it usually i use stored procedure
update table (xxx,xxx,xxx)
values (uu,uuu,uu)
My component
<!--- Edit a Media Type --->
<cffunction name="cfn_MediaType_Update" access="remote">
<cfargument name="gridaction" type="string" required="yes">
<cfargument name="gridrow" type="struct" required="yes">
<cfargument name="gridchanged" type="struct" required="yes">
<!--- Local variables --->
<cfset var colname="">
<cfset var value="">
<!--- Process gridaction --->
<cfswitch expression="#ARGUMENTS.gridaction#">
<!--- Process updates --->
<cfcase value="U">
<!--- Get column name and value --->
<cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
<cfset value=ARGUMENTS.gridchanged[colname]>
<!--- Perform actual update --->
<cfquery datasource="#application.dsn#">
UPDATE SP.MediaType
SET #colname# = '#value#'
WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
</cfquery>
</cfcase>
<!--- Process deletes --->
<cfcase value="D">
<!--- Perform actual delete --->
<cfquery datasource="#application.dsn#">
update SP.MediaType
set Deleted=1
WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
</cfquery>
</cfcase>
<cfcase value="I">
<!--- Get column name and value --->
<cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
<cfset value=ARGUMENTS.gridchanged[colname]>
<!--- Perform actual update --->
<cfquery datasource="#application.dsn#">
insert into SP.MediaType (#colname#)
Values ('#value#')
</cfquery>
</cfcase>
</cfswitch>
</cffunction>
my table
mediatype:
mediatypeid primary key,identity
mediatypename
my code is
<cfform method="post" name="GridExampleForm">
<cfgrid format="html" name="grid_Tables2" pagesize="3" selectmode="edit" width="800px"
delete="yes"
insert="yes"
bind="cfc:sp3.testing.MediaType.cfn_MediaType_All
({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
onchange="cfc:sp3.testing.MediaType.cfn_MediaType_Update({cfgridaction},
{cfgridrow},
{cfgridchanged})">
<cfgridcolumn name="MediaTypeID" header="ID" display="no"/>
<cfgridcolumn name="MediaTypeName" header="Media Type" />
</cfgrid>
</cfform>
on insert I get the following error message ajax logging error message
http: Error invoking xxxxxxx/MediaType.cfc : Element '' is undefined in a CFML structure referenced as part of an expression.
{"gridaction":"I","gridrow":{"MEDIATYPEID":"","MEDIATYPENAME":"uuuuuu","CFGRIDROWINDEX":4} ,"gridchanged":{}}
ThanksIs this with the Travel database or another database?
If it's another database then make sure your columns
allow nulls. To check this in the Server Navigator, expand
your DataSource down to the column.
Select the column and view the Is Nullable property
in the Property Sheet
If still no luck, check out a tutorial, like Performing Inserts, ...
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
John -
Inserting Multiple Rows in a table
Hello,
I need to insert multiple rows in a table with the selected items from a list (Multiple select).
How do i go about it. I'm using ADF-struts-UIX application on Jdeveloper 9.0.5.2
Thanks.Jonas, I've downloaded the sample application from your ADF UIX Editable table tip but have some problems.
I can't even open the emp.table.uix file - errors are:
Parsing error. Unable to parse binding.
javax.servlet.jst.el.ELException:Function ctrl:createSortableHeaderModel was not found.
and
javax.servlet.jst.el.ELException:Function ctrl:getSortOrder was not found.
Also - is there a place in the sample where you define the sample tables? They do not seem to match the standard sample emp table, for instance.
I've just started using JDeveloper and would like to use the solution.
Thanks - Linda -
How to insert record inside the internal table in below code
Hi all,
My requirement is to find the sub-total and need to insert in between the internal table.
You can see the output ....where I want the sub-total F2 when 1 & 2 combindely , 3 , 4& 5 combindely .Please check it and let me know is it possible
when i am using modification it is not creating extra row inside the table instead it is modifying one row and putting the total there.
For ex: the origianl output is
F1 F2 F3
A 1 1
B 1 1
F 2 1
D 3 1
E 4 1
C 5 1
We want to display all the total of f2 of 1-2 , 3 , 4-5
so expcected output is
F1 F2 F3
A 1 1
B 1 1
F 2 1
* 3 ->This is the sub-total of 1& 2 of f2
D 3 1
* 1 ->this is the sub-total of 3
E 4 1
C 5 1
* 2 -> this is the sub-total of 4 & 5
= space
But coming output is
A 1 1
B 1 1
* 3 -> it is modifying the F row and inserting the total .Total is comong correct but is shoule insert instead of modifying the record!!
* 1
E 4 1
* 2
Please help how to insert the row total at the end of the chage of field
Please find the below code ..Due to space problem i am attaching below
SasHere is the solution ....i Got the answer Thanks for your helping hands friends
REPORT YTEST_MODIFY.
DATA: BEGIN OF ITAB OCCURS 1,
TOT TYPE C,
F1 TYPE C,
F2 TYPE C,
F3 TYPE I ,
END OF ITAB.
DATA: BEGIN OF JTAB OCCURS 1,
F1 TYPE C,
F2 TYPE C,
F3 TYPE I ,
END OF JTAB.
START-OF-SELECTION.
ITAB-F1 = 'A'.
ITAB-F2 = 1.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'B'.
ITAB-F2 = 1.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'C'.
ITAB-F2 = 5.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'D'.
ITAB-F2 = 3.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'E'.
ITAB-F2 = 4.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'F'.
ITAB-F2 = 2.
ITAB-F3 = 1.
APPEND ITAB.
SORT ITAB BY F2.
LOOP AT ITAB.
WRITE:/1 ITAB-F1 ,
8 ITAB-F2 ,
10 ITAB-F3 .
ENDLOOP.
LOOP AT ITAB.
IF ITAB-F2 = 1 OR ITAB-F2 = 2.
ITAB-TOT = 1.
MODIFY ITAB.
ELSEIF ITAB-F2 = 3.
ITAB-TOT = 3.
MODIFY ITAB.
ELSEIF ITAB-F2 = 4 OR ITAB-F2 = 5.
ITAB-TOT = 4.
MODIFY ITAB.
ENDIF.
ENDLOOP.
SKIP 2.
SORT ITAB BY TOT.
DATA : L_SUM(2) TYPE C,
L_ROW(2) TYPE C.
LOOP AT ITAB.
MOVE-CORRESPONDING ITAB TO JTAB.
APPEND JTAB.
L_SUM = L_SUM + ITAB-F3 .
AT END OF TOT.
CLEAR JTAB.
JTAB-F3 = L_SUM .
APPEND JTAB.
CLEAR L_SUM.
ENDAT.
ENDLOOP.
LOOP AT JTAB.
WRITE:/1 JTAB-F1 ,
8 JTAB-F2 ,
10 JTAB-F3 .
ENDLOOP.
* DATA: a TYPE i , b .
* LOOP AT itab.
* IF b = 0.
* a = a + itab-f3.
* ENDIF.
* AT END OF tot.
* MOVE space TO itab-f1.
* MOVE space TO itab-f2.
* MOVE a TO itab-f3.
* MODIFY itab .
* CLEAR a.
* b = 1.
* ENDAT.
* b = 0.
* ENDLOOP.
* LOOP AT itab.
* MOVE-CORRESPONDING itab TO jtab.
* APPEND jtab.
* ENDLOOP.
* ULINE.
* LOOP AT jtab.
* WRITE: / jtab-f1 , jtab-f2 , jtab-f3.
* ENDLOOP. -
Inserting multiple rows into a table (using sequences)
Hi!
I want to insert multiple rows into a db table, but I don't know how.
I know how to insert 1 row using a sequence:
I put all the fields in the jsp form's page and in the submit page I put something like this:
<jbo:Row id="myRow" datasource="ds" action="Update" rowkeyparam="MyRowKey" >
<jbo:SetAttribute dataitem="*" />
</jbo:Row>
But how can I insert multiple rows like this:
Id Name
1 ana
2 monteiro
3 maria
Thanks!Hi Chris,
I think this should give you what you need: Working with a Multiple Select List Item
--Jennifer -
How to compare two rows from two table with different data
how to compare two rows from two table with different data
e.g.
Table 1
ID DESC
1 aaa
2 bbb
3 ccc
Table 2
ID DESC
1 aaa
2 xxx
3 ccc
Result
2Create
table tab1(ID
int ,DE char(10))
Create
table tab2(ID
int ,DE char(10))
Insert
into tab1 Values
(1,'aaa')
Insert
into tab1 Values
(2,'bbb')
Insert
into tab1 Values(3,'ccc')
Insert
into tab1 Values(4,'dfe')
Insert
into tab2 Values
(1,'aaa')
Insert
into tab2 Values
(2,'xx')
Insert
into tab2 Values(3,'ccc')
Insert
into tab2 Values(6,'wdr')
SELECT
tab1.ID,tab2.ID
As T2 from tab1
FULL
join tab2 on tab1.ID
= tab2.ID
WHERE
BINARY_CHECKSUM(tab1.ID,tab1.DE)
<> BINARY_CHECKSUM(tab2.ID,tab2.DE)
OR tab1.ID
IS NULL
OR
tab2.ID IS
NULL
ID column considered as a primary Key
Apart from different record,Above query populate missing record in both tables.
Result Set
ID ID
2 2
4 NULL
NULL 6
ganeshk -
Insert multiple rows in on table and retreive sequence values
Hello,
I'm searching a way to insert several rows in a table that needs a sequence and retreive its.
For one row i use ExecuteScalar method with the following SQL is :
INSERT INTO MY_TABLE(MY_PK)
VALUES(SEQ_MY_TABLE.NEXTVAL) RETURNING MY_PK INTO :MY_PARAMETER
The aim is to insert several rows at one time. Currently I execute this SQL :
INSERT INTO MY_TABLE(MY_PK, MY_VALUE)
SELECT SEQ_MY_TABLE.NEXTVAL, MY_VALUE
FROM (
SELECT 0 MY_VALUE FROM DUAL UNION ALL
SELECT 1 MY_VALUE FROM DUAL
This query works well but i'm wondering how to retreive all sequence values generated by this query.
Is it possible and how ?
Thank you.
SebastienI tried this :
string sql = "INSERT INTO MY_TABLE(MY_PK, MY_VALUE) " +
"SELECT SEQ_MY_TABLE.NEXTVAL MY_PK, MY_VALUE FROM ( " +
"SELECT 0 MY_VALUE UNION ALL " +
"SELECT 1 MY_VALUE) " +
"RETURNING MY_PK BULL COLLECT INTO : RETURN_IDS";
using(var manager = myFactory.CreateDbManager()) // Initializes the connection and encapsulates ADO objects
manager.SetCommand(sql);
var cmd = (OracleCommand)manager.Command;
cmd.ArrayBindCount = 2;
var p = new OracleParameter();
p.DbType = DbType.Int64;
p.ParameterName = "RETURN_IDS";
p.Direction = ParameterDirection.Output;
p.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
p.Size = 2*sizeof (long);
cmd.Parameters.Add(p);
cmd.ExecuteNonQuery();
var result = (Oracle.DataAccess.Types.OracleDecimal[])p.Value;
But I have an error ORA-00933 that indicates that the query is wrong at "RETURNING MY_PK".
.......................................................................................................^
Edited by: CITnDev on 1 août 2012 13:00
Edited by: CITnDev on 1 août 2012 15:10 -
Inserting multiples rows into a table using function or procedure..
How do i insert multiples rows into a table using function or procedure?
Please provide me query..Use FORALL bulk insert statement...
eg:
procedure generate_test_data as
type cl_itab is table of integer index by pls_integer;
v_cl_itab cl_itab;
type cl_vtab is table of varchar2(25) index by pls_integer;
v_cl_vtab cl_vtab;
type cl_dtab is table of date index by pls_integer;
v_cl_dtab cl_dtab;
begin
for i in 1.. 100 loop
v_cl_itab(i):= dbms_random.value(1,1000);
v_cl_vtab (i):=dbms_random.string('a',20);
v_cl_dtab (i):=to_date(trunc(dbms_random.value(2453737, 2454101)),'j');
end loop;
forall i in v_cl_itab.first .. v_cl_itab.last
execute immediate 'insert into test_order values( :n, :str , :dt ) ' using v_cl_itab(i), v_cl_vtab (i), v_cl_dtab (i);
commit;
end; -
How to insert data into the mysql table by giving as a text file
Hi,
Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.
Thanks:)At least you can try StringTokenizer to parse your text files. Or download a text JDBC driver to parse your files, for instance, HXTT Text(www.hxtt.net) or StelsCSV(www.csv-jdbc.com).
-
How can i update rows in a table based on a match from a select query
Hello
How can i update rows in a table based on a match from a select query fron two other tables with a update using sqlplus ?
Thanks Glenn
table1
attribute1 varchar2 (10)
attribute2 varchar2 (10)
processed varchar2 (10)
table2
attribute1 varchar2 (10)
table3
attribute2 varchar2 (10)
An example:
set table1.processed = "Y"
where (table1.attribute1 = table2.attribute1)
and (table1.attribute2 = table3.attribute2)Hi,
Etbin wrote:
Hi, Frank
taking nulls into account, what if some attributes are null ;) then the query should look like
NOT TESTED !
update table1 t1
set processed = 'Y'
where exists(select null
from table2
where lnnvl(attribute1 != t1.attribute1)
and exists(select null
from table3
where lnnvl(attribute2 != t1.attribute2)
and processed != 'Y'Regards
EtbinYes, you could do that. OP specifically requested something else:
wgdoig wrote:
set table1.processed = "Y"
where (table1.attribute1 = table2.attribute1)
and (table1.attribute2 = table3.attribute2)This WHERE clause won't be TRUE if any of the 4 attribute columns are NULL. It's debatable about what should be done when those columns are NULL.
But there is no argument about what needs to be done when processed is NULL.
OP didn't specifically say that the UPDATEshould or shouldn't be done on rows where processed was already 'Y'. You (quite rightly) introduced a condition that would prevent redo from being generated and triggers from firing unnecessarily; I'm just saying that we have to be careful that the same condition doesn't keep the row from being UPDATEd when it is necessary. -
How to insert multiple rows in a single shot using insert command?
Hi,
If we insert one row, we can use "insert into" command. I want to insert multiple rows into the table in a single shot. Is there any SQL command for insert multiple rows into the table?
Plese give the solution.
Thanks,
chelladuraiIf you would like to do it with SQL, this would be one of the ways to achive it:
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Sep 25 10:12:59 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Data Mining and Real Application Testing options
SQL>
SQL> desc leap
Name Null? Type
FIRST_PRICE NUMBER(16,6)
NEXT_PRICE NUMBER(16,6)
SQL>
SQL> select * from leap;
no rows selected
SQL>
SQL>
SQL> !vi multirow_insert.sql
SQL> !cat multirow_insert.sql
insert into leap(first_price, next_price) values (1,2);
insert into leap(first_price, next_price) values (3,4);
insert into leap(first_price, next_price) values (5,6);
SQL>
SQL> @multirow_insert.sql
1 row created.
1 row created.
1 row created.
SQL> commit;
Commit complete.
SQL>
SQL>
SQL> select * from leap;
FIRST_PRICE NEXT_PRICE
1 2
3 4
5 6
SQL>
Maybe you are looking for
-
Hi guys, I'm receiving the following error in a Standard Sales Order: OR against pricing condition: VPRS - <b>Error in quantity/value determination.</b> I believe I have to set this up either in the payment terms table OBB8 or against the material. C
-
Based from my code, how do I implement an ALV grid using OO concept...
Hello experts, I am currently practicing ABAP Objects and I would like to use alv in my report. Now, How can I implement ALV in my report in the simplest way possible. Sample codes will be highly appreciated. Thanks guys and take care! REPORT z_aris
-
Can I copy a spreadsheet from Numbers into the body of an email message?
I created a basic calendar originally in Excel and have moved to Numbers. When I copy the Numbers spreadsheet calendar to the body of an email message, it loses all borders and formats and looks like a word salad. I need to paste it into the email me
-
Cash flow Report-profit centres
My requirement is to make cash flow reports for profit centres. In our case new GL is activated with profit centre clearing scenario. Is the standard reports is based on Profit centres or company codes ?
-
Hi, is there any open-source implementation or reference documentation which tells me which ADPUs I have to send to initialize communication (load applet keys, select applet ...) before I can communicate with my java card applet? Especially the authe