Mass storage procedures of oracle and SQL server can be replaced

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

1. replace or replace in the create or replace Procedure Stored Procedure Code for oracle to CREATE a stored Procedure with null

2. Replace oracle variables (with the same field name) with the @ variable name.

For example, replace user_id with @ user_id.

3. Replace IS with. (Note: You must manually advance the in to the AS directory ).

4. The following four items are the cursor part.

Replace oracle CURSOR CurA IS with DECLARE CurA CURSOR LOCAL

Replace oracle cursor fetch CurA into with Fetch next from CurA

Replace the oracle cursor IF (curA % NOTFOUND) THEN with IF (@ fetch_status <> 0) BEGIN

Replace the oracle cursor IF (curA % FOUND) THEN with IF @ fetch_status = 0 BEGIN

5. Replace; (semicolon) in oralce with a space

6. Replace the oracle copy symbol = with =. Of course, the SET symbol must be manually added one by one.

7. replace all then in oracle with begin, and replace all end if with end.

8. Replace the space IN the oracle parameter with the space (note that it is a space in space)

9. Replace the oralce NVL function with ISNULL.

10. Replace SYSDATE of the current time function in oracle with GETDATE.

11. Replace varchar2 in Oracle with varchar (note that you need to add the specific varchar size yourself)

12. Replace ELSIF in oracle with ELSE IF

13. Replace oracle connection string | with SQL Server connection string +

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.