sqlcode

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

Oracle Stored Procedure cursor

Create or replace procedure t_ps_trycalculate (v_date in varchar2) As /* The monthly performance check determines whether the employee's performance is successful based on parameters. Parameter: v_date performance year/month */ -- Define error Variables Some_kinds_of_err exception; -- Exception to indicate an error condition V_errorcode number; -- variable to hold the error message code V_errortext varchar2 (2000); -- variable to hold the error message text V_error_ SQL varchar2 (4000); -- SQL s

SQL Server, Excel, and access data import

: -- ========================================================== ==================== Select * Into Newtable From OpenDataSource ( ' Microsoft. Jet. oledb.4.0 ' , ' Data Source = "C: \ book1.xls"; user id = admin; Password =; extended properties = Excel 5.0 ' )... [ Sheet1 $ ] Instance: Select * Into Newtable From OpenDataSource ( ' Microsoft. Jet. oledb.4.0 ' , ' Data Source = "C: \ finance \ account.xls"; user id = admin; Password =; extended p

Oracle function implementation: Convert lowercase RMB to uppercase invoice

, 'taobao', 16, 'wan', null)Into v_upperpart from dual;V_upperstr: = v_upperpart | v_upperstr;End loop; V_upperstr: = Replace (v_upperstr, 'zero restart', 'zero ');V_upperstr: = Replace (v_upperstr, 'zero failed', '0 ');V_upperstr: = Replace (v_upperstr, 'zero failed', '0 ');V_upperstr: = Replace (v_upperstr, 'zero zero 0', 'zero ');V_upperstr: = Replace (v_upperstr, '0', '0 ');V_upperstr: = Replace (v_upperstr, 'zero-angle and zero-point', 'Integral ');V_upperstr: = Replace (v_upperstr, 'zero p

PB Application objects and configuration files

. servername = "CWD"Sqlca. logid = "sa"Sqlca. autocommit = falseSqlca. dbparm = ""// The following is generally not usedSqlca. userid = ""Sqlca. dbpass = ""Sqlca. Lock = ""Connect using sqlca; Sqlca. sqlcode = 0 // database connection successful-1 // database connection Error100 // The connection is successful, but no data is retrieved (usually used in DW) ◆ Close ()This event is triggered when the user closes the application. This event has no parame

Understanding of DB2 locks

the table, other programs can also obtain the IX lock of the table for data modification. However, after the lock is upgraded, the program will upgrade the table to the S lock, other programs cannot modify the table. Will be in the lockwaiting status.The lock upgrade may fail. It is easy to understand. Next, the above lock is originally is, And the IX lock is not released yet. The lock is upgraded to the S lock, but s and IX are not compatible, in this case, the lock upgrade fails. The applicat

Transfer Data between stored procedures

---- Start Stored Procedures can call each other. How can we transmit data between them? There are three methods. I. Data Transmission Through Input and Output Parameters This is the simplest method, but it is worth noting that the return statement in the stored procedure has different meanings than the return statement in other programming languages. The Return Statement in the stored procedure puts back the sqlcode value. Ii. pass data through sessi

Application of range Partitioning in data expiration Processing

(sysdate, to_date (substr (min (partition_name), 7,8), 'yyyy-mm') into v_over_time From user_tab_partitions where table_name = 'sale _ data '; -- Delete the earliest Partition If v_over_time> 12 then Execute immediate 'alter table sale_datadrop partition '| v_part_name; End if; Exception When others then V_err_num: = sqlcode; V_err_msg: = substr (sqlerrm, 1,100 ); Dbms_output.put_line ('execution error: '| v_err_num |' error Description: '| v_err_ms

Transaction object analysis?

and Oracle need to specify this parameter. 7 Logpass String The user password used to log on to the database server. This attribute can be set but cannot be set, but Sybase and Oracle need to specify a password. 8 Servername String Database Server name. 9 Autocommit Boolean Specifies whether to set the database to automatically submit all transactions. The default value is false. That is to say, you must manage transactions in the applicatio

Unable to retrieve log files on some processes [Iway log exception resolution after pumping and iway log File Introduction]

of the messages? You can do that with the following two commands in a pre-extract stored procedure.Set message = offset emgsrv = OFFBut a warning: some error messages are also disabled, so if there are problems with the flow, you may need to remove these settings to diagnose them. Rejected row messages. when the "key matching logic" option "include duplicates" is used with a relational database target, duplicate rows still can't be inserted into a table if there is a unique constraint. instead

DB2 SQL stored procedure Study Notes

Procedure feathures:Parameter modes:3 types of parameters: 1) in: Incoming data to Stored Procedure 2) Out: stored procedure returns data 3) inout: the part of the incoming data, overwritten by returned data during execution Result sets:Stored Procedure uses cursor to pass the result set to the caller. The stored procedure must retain a cursor for each result set to be returned.> Use with return to caller/client to specify the objects returned by the result set. If this parameter is set to clie

Basic DB2 database operations and basic db2 operations

, oprnm, brhid, passwd from 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 disco

PB + ms SQL + trigger must note that pbsql

are created in SQL.PB cannot dynamically create SQL triggers with variables? Messagebox ("", ls_mysql)// After the prompt box is displayed, press ctrl + c to copy the prompt box content, and then press ctrl + v to query the analyzer to see if there is any problem.Sqlto. autocommit = trueExecute Immediate: ls_ SQL; If sqlto. sqlcode = 0 ThenMessagebox ("", "successful! ")ElseMessagebox ("", "failed! "+ Sqlto. sqlerrtext)End IfSqlto. autocommit = false

How to modify the DB2 server host name

user to execute "db2stop" 2) modify the server host name (for details about how to modify the host name in various operating systems, refer to the relevant operating system documentation) 3) Run db2set-gDB2SYSTEM=db2terminate The above command should not cause any problems on Windows. However, if your operating system is Linux or UNIX, errors may occur at this time, for example, V8 or V9.1, You will encounter the following error message: $db2set–gDB2SYSTEM=pirates DB2SETprocessin

Check the Statement of the Oracle transaction and the statement of the oracle transaction.

rollback is expected to be completed within 5.04 hours. Note: in other environments, replace KTUXEUSN with KTUXESLT = 5. SQL statements for Oracle-defined transactions SQL> select * from test_main; ID VALUE------------------------------2 TWO3 THREE1 ONESQL> BEGIN2 -- insert two identical data records to repeat the primary key and roll back the transaction after an error is thrown.3 insert into test_main (id, value) VALUES (4, 'four ');4 insert into test_main (id, value) VALUES (4, 'four ');5 CO

Oracle bad block processing script

, Oracle_error_code number );Rem Create the new empty table:Create table new_tableAs select *From affected_tableWhere 1 = 2;Set serveroutput onDeclareN number: = 0;Bad_rows number: = 0;Error_code number;Ora600 EXCEPTION;PRAGMA EXCEPTION_INIT (ora600,-600 );BeginFor I in (select rowid rid from affected_table) loopBeginInsert into new_tableSelect *From affected_tableWhere rowid = I. rid;N: = n + 1;ExceptionWhen ora600 thenBad_rows: = bad_rows + 1;Insert into bad_rows values (I. rid, 600 );Com

Oracle Stored Procedure learning notes

Connection character: |Value assignment: ": ="For example, l_name: = 'sky ';Determine whether the values are equal: "="For example, if 1 = 1 then...Variable binding :":"For example, if: P_NAME = 'sky' then... ExistsNot exists does not exist % Type matching Field type% Rowtype matching record type% Type when the table type changes, you do not need to manually modify the type called in PL/SQL blocks.Example: V_GP_ID SC _BALANCE_DAILY.Gp_Id % TYPE; Sqlcode

Reserved keywords in Oracle

RAISE, RANGE, RAW, READ, RECORD, REF, REFERENCE, RELIES_ON, REM, REMAINDER, RENAME, RESULT, RESULT_CACHE, RETURN, RETURNING, REVERSE, ROLLBACK, ROW S SAMPLE, SAVE, SAVEPOINT, SB1, SB2, SB4, SECOND, SEGMENT, SELF, SEPARATE, SEQUENCE, SERIALIZABLE, SET, SHORT, SIZE_T, SOME, SPARSE, SQLCODE, SQLDATA, SQLNAME, SQLSTATE, STANDARD, STATIC, STDDEV, STORED, STRING, STRUCT, STYLE, SUBMULTISET, SUBPARTITION, SUBSTITUTABLE, SUM, SYNONYM

SQL/plus command

: System_variable All BTI [TLE] Err [ors] [{function | procedure | package body | Trigger | View | type body} [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 err

Oracle case, loop, while, for simple instances

EMPWhere EMP. employee_id ExceptionWhen e_integrity thenDbms_output.put_line ('Too many values: '| sqlerrm );When no_data_found thenDbms_output.put_line ('no value: '| sqlerrm );-- When others then-- Dbms_output.put_line ('value assignment error '| sqlerrm );End;---------------------- Non-predefined ------------------------DeclareE_integrity exception;Pragma prediction_init (e_integrity,-2291 );BeginUpdate employees set employees. department_id = 10Where employees. employee_id = 101;ExceptionWh

DB2 troubleshooting records

1.142575278063135 Location1 Hg 0.0018310994140037379 Location1 fe 0.2974983113601452 Location1 Mn 0.09548843270448454 Location2 pH 6.096025515217242 Location2 Hg 0.005575948698159294 Location2 fe 0.32657056877142043 Location2 Mn 0.009418315198912612 The resulting crosstab chart: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Location pH Hg Fe MnLocation1 1.142575278063135 0.0018310994140037379 0.2974

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.