Oracle and SQL Server bulk stored procedures can replace parts

Source: Internet
Author: User
Tags current time sql server connection string oracle cursor

1. Replace with NULL in the code create or replace Procedure stored procedure name of Oracle Establishment stored procedure

2, the Oracle variable (and the name of the field is not duplicate) directly replaced by the @ variable name.

For example: USER_ID is replaced with @user_id

3, replace the is with AS. (Note: You need to manually forward the begin to the as below.)

4, the following 4 is the cursor part

Replace the Oracle Cursor CURSOR Cura is with the DECLARE cura CURSOR Local

Replace the Oracle cursor fetch cura into the fetch next from Cura into

Replace the Oracle cursor if (cura%notfound) THEN with the IF (@ @fetch_status <> 0) BEGIN

Replace the Oracle cursor if (cura%found) THEN with the IF @ @fetch_status = 0 BEGIN

5. Replace the Oralce (semicolon) with a space

6, the Oracle's replication symbol: = Replace with =, of course, the previous set symbol must be manually a single Add.

7. Replace all Oracle then with begin and replace all end if with end

8, the Oracle parameter in the space in space to replace space (note that this is a space in space)

9, replace the Oralce NVL function with IsNull

10. Replace the function Sysdate of the current time in Oracle with GETDATE

11. Replace the VARCHAR2 in Oracle with varchar (Note that you need to add varchar specific size)

12. Replace elsif in Oracle with ELSE IF

13, the Oracle connection string | | Replace with SQL Server connection string +

Related Article

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.