Label:Today's data cleanup found an error ORA-26026, the main is to extract data from the trading library and inserted into the archive library.Check that the discovery is an index issue for the archive library.In order to increase the insertion speed, the index of the archive library was removed, which could have an impact on the primary key index.The solution is simple, re-rebuilding the table's primary key index, problem solving.SQL statements:ALTER INDEX index name rebuild;
1. Invalid month problem
When you recently inserted a time into the database, Oracle reported an "invalid month issue" with the following SQL:
Copy Code code as follows:
INSERT into Ts_count (
Id,cname, StartTime, Endtime,value
) VALUES (
1, ' John ', ' 01/06/2013 ', ' 02/06/2013 ', 800
);
Error: ORA-01843: Invalid month. This is due to incorrect date format.
Solution:With select Sysdate fr
Label:If the table structure corresponds to only one field, you can select col1 bulk collect into variable without a cursor loop, simple and efficientCreate or Replace function Get_airway_subpoint (awid in number)Return Airway_subpnts_tab is--create OR REPLACE TYPE airway_subpnts_tab as Table of number (11)V_ptns Airway_subpnts_tab;--Return route all points IDBeginSelect F2.airway_point1 Bulk collect into V_ptns from rte_seg f1,segment F2where f1.en_route_rte_id =14595 andf1.segment_id =f2.segme
the CallableStatement object Registeroutparameter. //The advantage of this method is that as long as the SQL interaction, performance is good, the disadvantage is the need to use the PL-SQL syntax, code is not intuitive, use less. Public intInsertdatareturnkeybyplsql ()throwsException {Connection conn=getconnection (); String Vsql= "Begin INSERT into T1 (ID) VALUES (seq_t1.nextval) returning ID into:1;end;"; CallableStatement cstmt=(CallableStatemen
Tags: how the body cond directly is what ACL logic commonly used blogMotivation:You want to do insert/update directly with an SQL statement in Oracle.DescriptionWhen writing SQL statements, we often encounter a large number of simultaneous insert/update statements, that is, when there is a record, it is updated (update), when no data exists, insert (
Explore Oracle The database upgrade seven11gR2 to 12c Insert after upgrade complete PDBObjective: fromOracle 12cat the beginning, the concept of container database is introduced, which can implement database plug-in operation, such as:now let's take a look at how to11.2.0.4the database is inserted into the12cof theCDPgo inside and let it be aPDBDatabase.First, View database Information :sql> Col BANNER for
(name)select Id,name from Z_test;When using the ALL keyword, Oracle judges each condition from top to bottom, and executes the following into statement when the condition is metIn The example above, if Id=6 then inserts a record in the Z_test1, and also inserts a record in the Z_test2Note: When using the first keyword, Oracle will judge each condition from top to bottom, execute the following into statemen
Tags: detailed live boa View connection values drop create SeleIn Oracle, select intoFrom can not be used, with createTableSelect to replace this function!!! It works correctly in SQL Server. 1.INSERT intoThe SELECT statement statement is in the form:Insert intoTable2 (Field1,field2,...)SelectValue1,value2,... fromTable1 Note: (1requires that the target table Table2 must exist, and the field field,field2
Tags: View today's code BSP update requirements query recordToday comes a strange question about the order of execution of INSERT and UPDATE statements in one transaction of Oracle. First, the whole process is explained in detail: There are three tables: the A,b,c,java code has a section of code that inserts a piece of data into table A before updating the two fields in table B, and the updated two fields a
,ename,sal from EMP where 1=2;CREATE TABLE EMP2 as select Sequen,ename,cid from EMP where 1=2;Below we use four kinds of multiple table INSERT statementsA, insert all unconditionally insertInsert AllInto EMP1 (sequen,ename,sal) VALUES (sequen,ename,sal)Into EMP2 (sequen,ename,cid) VALUES (SEQUEN,ENAME,CID)Select Sequen,ename,sal,cid from EMP;Insert all conditiona
Unconditional insertionInsert all in Oracle refers to inserting the same batch of data into different tables, if there is one requirement: Insert the data from the T table into t1,t2, assuming that you do not know the insert all, you may insert 2 times with INSERT, for examp
Tags: BSP. NET details creat database order Oracle Database mission logOracle Self-Growth ID: Reference blog: Automatic incrementing of the Oracle Database creation table ID field MyBatis statements Reference blog: Reviews ibatis+oracle three ways to bulk insert. Refer to the third type Reference Blog: Two ways to BULK
Tags: PNG code class span BSP view file replace emptyHow to Insert BlobData(image, video) intoOracleBLOB size in this post it's shown how I can insert Blob data link image video to Oracle database and also how I can Det Ermine the size of the BLOB data from Oracle.1) Create Directory Where BLOB resides.Create or Replac
Label:The previous article recorded the C # Implementation of SQL Server 2005 and Oracle two database synchronization tool, today when the tool is copied to the server running when the synchronization of Chinese characters into garbled, Baidu after a few resolved the problem, the resolution process is recorded as follows:1. A standalone Oracle client is installed on the server, and Baidu later discovers tha
Oracle INSERT INTO syntax
Basically, there are two ways we can enter the data into the table. One is to enter a pen at a time, the other is to enter several pens at a time. Let's look at a way to enter a pen first.
By convention, we'll introduce grammar first. The syntax for entering one piece of data at a time is as follows:
INSERT into "table name" ("Field 1
To intercept some log information:2015-09-01 14:48:47,132 INFO [Org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-Loading XML bean Definitions from class path resource [Org/springframework/jdbc/support/sql-error-codes.xml]2015-09-01 14:48:47,178 INFO [org.springframework.jdbc.support.SQLErrorCodesFactory]-Sqlerrorcodes loaded: [DB2, Derby, H2, HSQL, Informix, Ms-sql, MySQL, Oracle, PostgreSQL, Sybase, Hana]Org.springframework.jdbc.Uncateg
[Article summary] describes the basic use of the XmlType data type of Oracle9i includes: establishing a table with a XmlType data type Insert (insert) Data Query (SELECT) Data Update ( Update) Data Add more than 4k bytes of XML documents to XmlType fields for beginners. Keywords: oracle9i xmltype Oracle supports a new data type starting at 9i---- Xml
To do a bulk INSERT database, you first need to know the syntax that the database supports for bulk INSERT. The syntax for bulk inserts for each database is different, and I introduce two.Mysql:1, INSERT into table_name (id,name) VALUES (1, ' Zhang San '), (2, ' John Doe ')2. INSERT INTO table_name (ID,NAME) VALUES (1,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.