sqlcode

Want to know sqlcode? we have a huge selection of sqlcode information on alibabacloud.com

Complete notes on oracle PLSQL

multiple rows of data-- Dup_val_on_index-- Primary key repetition exception-- Zero_pide-- Try to divide by zero-- Invalid_number-- An error occurred while converting the string to a number. Custom exception: Create or replace procedure DDDD (v_empno emp. empno % type) isAaa emp. empno % type;E_a exception; -- Define an exceptionBeginSelect enameInto aaaFrom empWhere empno = v_empno; If aaa = 'sss' thenRaise e_a; -- raise is an exception-triggered statement.End if;ExceptionWhen e_a then.......

Use triggers to back up table data

);-- TMP_USER_OPT_DATETIME DATE;PRAGMA AUTONOMOUS_TRANSACTION;BeginTMP_PROJECT_ID: =: OLD. PROJECT_ID;TMP_COMPANY_ID: =: OLD. COMPANY_ID;TMP_CREATE_DATETIME: =: OLD. CREATE_DATETIME;...TMP_GROUP_ID: =: OLD. GROUP_ID;If updating thenInsert into AAA_LOG (PROJECT_ID, COMPANY_ID, CREATE_DATETIME,..., TMP_GROUP_ID, 'update', SYSDATE );Commit;Elsif deleting thenInsert into AAA_LOG (PROJECT_ID, COMPANY_ID, CREATE_DATETIME,..., TMP_GROUP_ID, 'update', SYSDATE );Commit;End if; EXCEPTIONWHEN TOO_MANY_ROW

Basic DB2 database operations

btpoper"4. Delete table data:Db2 "delete from btpoper"Db2 "delete from btpoper where brhid = '000000' or brhid = '000000 '"5. Modify Table data:Db2 "update svmmst set prtlines = 0 where brhid = '000000' and jobtp = '02 '"Db2 "update svmmst set prtlines = 0 where jobtp = '02 'or jobtp = '03 '"6. Database ConnectionDb2 connect to btpdbs7. Clear database connectionsDb2 connect reset disconnects the databaseDb2 terminate disconnect DatabaseDb2 force applications all disconnect all databases8. Back

One of the issues with connecting to DB2 via SSH

The following error was reported when I connected the database via ssh yesterday (db2 client connection is normal): [db2inst1 @ CONTroot] $ metadata. SQLSTATE57017 [db2inst1 @ CONTroot] The following error was reported when I connected the database via ssh yesterday (the db2 client is connected normally ): [db2 inst1 @ CONT root] $ db2 connect to test SQL0332N Character conversion from the source code page 1386 to the target code page 819 is not supported. SQLSTATE = 57017 [db2inst1 @ CONT root

Stored Procedure 5-handling of conditions and exceptions and handling of Stored Procedure exceptions

returns-1. Because of the id conflict, if you run the command in 24 rows, the system will not exit and continue to execute, but 22 rows will be executed. Therefore, the second response is-1. Oracle Stored Procedure Exception Handling Create an Error Tracking table firstCreate sequence s_error_id;Create table ERROR_RECORD(ERROR_ID NUMBER (10) primary key,ERROR_CODE NUMBER (10 ),ERROR_MSG VARCHAR2 (2000 ),ERROR_DATE DATE,ERROR_PROGRAM VARCHAR2 (200));-------- Write error information to the tracki

Storage and query instances in the mssqlserver Tree Structure

In the storage and query instance design of the mssqlserver tree structure, tree structures such as employee relationship tables and organizational structure tables are often stored. Sqlcode -- Test Data createtable # employees ( nbsp; employeecodevarchar (20) notnullprimarykeyclustered, nbsp; storage and query instances in the mssql server Tree Structure Tree structures, such as employee relationship tables and organizational structure tables, are o

Comparison of update statement efficiency (mergeinto)

t_tmp_nt_customerdetail tUsing (select B. id, B. birth from t_tmp_school B where B. birth is not null)On (t. schoolid = a. id)When matched thenUpdate set t. birthdate = a. birth where t. schoolid is not null; COMMIT;-- Commit the transaction and set the transaction flag to 0.V_BeginTran: = 0; EXCEPTIONWHEN OTHERS THEN-- Roll back the transaction if an exception occurs.IF v_BeginTran = 1 THENROLLBACK;End if;V_ErrCode: = SQLCODE;V_ErrMsg: = SUBSTR (SQL

DB2 programming skills (5)

The db2 tutorial is: DB2 programming skills (5 ). 1.16 Stored Procedure fence and unfenceThe stored procedure of fence enables a new address space separately, while the stored procedure of unfence uses the same address space as the process that calls it.In general, the fence stored procedure is safer.But sometimes some special requirements, such as the caller's pid, will be unable to get the fence stored procedure, but only unfence can get.1.17 SP error handling usageIf you call other SP with re

Summary of routine maintenance of IBM DB2 (6)

permission to the user. The REVOKE statement revokes the permission of a user. 116. What are DDL functions? CREATE DECLARE ALTER DROP And so on 117. What about DML? INSERT SELECT UPDATE DELETE And so on    118. Is there a boolean type in DB2? No    119. How do I query the built-in functions of DB2? Built-in document ADMINISTION --> SQLREFERENCE --> FUNCTIONS 120. How to execute the DB2 script file? DB2-VTFFILENAME    121. What is ROWNUM () like ORACLE in DB2? ROW_NUMBER () OVER ()    122

Query the clob column of db2 in Java

Use the following code in java to query the clob column of db2 (conn. createStatement (ResultSet. TYPE_SCROLL_INSENSITIVE, ResultSet. CONCUR_READ_ONLY )) Use the following code in java to query the clob column of db2 (conn. createStatement (ResultSet. TYPE_SCROLL_INSENSITIVE, ResultSet. CONCUR_READ_ONLY )) Use the following code in java to query the clob column of db2 (Conn. createStatement (ResultSet. TYPE_SCROLL_INSENSITIVE, resultset.concur_read_only1_cmd.exe cuteQuery (SQL)The follow

Oracle exception (pre-defined exception, custom exception) Application Introduction

During the development process, you may often encounter some tests. At this time, you may want to understand the testing process and analyze the code Errors Based on the process. In this case, you need to use custom exceptions. For more information, see this article.Declare an exception firstJava codeBiz_exception exception;And then throw it out.SQL codeCopy codeThe Code is as follows:P_RETCODE: = '-1 ';P_retInfo: = 'generated salary + Social Security Bill. Please do not generate it again. ';Rai

Description of precautions in DB2 batch update

largerapplicationheap. sqlcode:-954 sqlstate:57011 You need to set the heap size of the DB2 application. Http://fanqiang.chinaunix.net/db/db2/2005-07-20/3430.shtml 4.8 check which databases under this instance db2LISTDATABASEDIRECTORY[on/home/db2inst1] 4.9 view and modify the configuration of the database head Note that, in most cases, after the data configuration is changed, it takes effect only after all connections are disconn

DB2 database locking tips for a single session"

The following article mainly introduces the practical operation skills of the DB2 database for locking a single session. I have seen the actual operation skills of the DB2 database for locking a single session on the relevant website, and I think it is quite good, I will share it with you. The following is a detailed description of the article. I hope you can learn from it. Starting from version 8.2, DB2 users can specify a locking policy for each DB2 session. In earlier versions, you can only c

Common Oracle questions 1000 (3)

. If you want to modify the table name? Alter table old_table_name Rename to new_table_name; 96. How to obtain the return status value of the command? Sqlcode = 0 97. How do I know the user's permissions? Select * From dba_sys_privs; 98. What is the difference between the Oracle9i downloaded from the internet and the standard edition sold on the market? In terms of functions, there is no difference, except that Oracle has clearly stipulated that Oracl

Oracle file operation Encapsulation

; Exception When others then Dbms_output.put_line (sqlcode | ':' | sqlerrm ); Return 0; End; Function openfileread (filename in varchar2) return integer is Begin Return openfile (filename, 'R '); End; Function openfilewrite (filename in varchar2) return integer is Begin Return openfile (filename, 'w '); End; Procedure writeline (STR in varchar2) is Begin Utl_file.put_line (isto_file, STR); -- write a string End; Procedure writeli

Record the ASP. NET upload code

", sqldbtype. Int, 4 ), New sqlparameter ("@ upsize", sqldbtype. Int, 4 )}; Parameters [0]. Direction = parameterdirection. output; Parameters [1]. value = model. upname; Parameters [2]. value = model. uptime; Parameters [3]. value = model. upurl; Parameters [4]. value = model. uid; Parameters [5]. value = model. upsize; Dbhelpersql. runprocedure ("tbdropbox_add", parameters, out rowsaffected ); Return (INT) parameters [0]. value; } 21 rows of "tbdropbox_add" stored in

How to call Java sources in oralce Stored Procedure

_ app_sync_data_deal_ OK ';Return; ExceptionWhen others then rollback;V_flag: = 'proc _ app_sync_data_deal_fail ';V_err_code: = Concat (sqlcode, 2 );V_err_msg: = 'proc _ app_sync_data_deal '| sqlerrm;Insert into proc_error values (proc_error_id_seq.nextval, v_err_code, v_err_msg, sysdate );Commit;End; You can use debugging methods to test whether the obtained results are correct. How to use: A. Select the name of the stored procedure, right-click ---

Oracle SQL * Plus

} [schema.] Name] Lno Parameters [parameter_name] PNO Rel [statement] Repf [Ooter] Reph [eader] SGA Spoo [l] Sqlcode TTI [TLE] User 1). display the value of the current environment variable: Show all 2). displays the error information of the currently created function, stored procedure, trigger, package, and other objects. Show ERROR When an error occurs in creating a function or stored procedure, you can use this command to view the error and relat

Development Framework: Use struts for international support

method is used to obtain the value of the variable. Another method is to submit the variable on the JSP page using form. The variables submitted by this method can be obtained through the getxxx method of form on the server side. When the web system needs to be internationalized, the JSP page encoding method is specified as a UTF-8 (previously described), that is, the page can process national text, when using URL to pass a variable, you must use the js method encodeuri to process the variable

Basic EBS development knowledge

I. Exception Handling Many people prefer to set exception to 'null'. It should be said that this is a bad habit. If a specific exception is not defined, at least the database error information should be completely reported.Incorrect syntax:ExceptionWhen others thenNULL;End;Correct syntax:ExceptionWhen others thenFnd_file.put_line (fnd_file.output, sqlcode );Fnd_file.put_line (fnd_file.output, sqlerrm );End; Ii. Output and log of concurrent requests ar

Total Pages: 15 1 .... 11 12 13 14 15 Go to: Go

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.