Operations and precautions for migrating data from Oracle to DB2

Source: Internet
Author: User

This article mainly addresses some of the issues that need to be paid attention to during the actual operations from Oracle database to DB2 data migration, the following is an introduction to some of the actual operations from Oracle database to DB2 data migration that require attention.

1. decode in Oracle

DB2 solution: Use case conditional expressions.

Two syntax modes of case:

(1) CASE

WHEN condition THEN result 1

ELSE result 2

END

(2) CASE expression 1

WHEN expression 2 THEN result 1

ELSE result 2

END

The above WHEN can be repeated multiple times, just like the expression of SWITCH... CASE in C.

For example:

Select ordno, CUSNO,

Case month (SHIPDATE)

WHEN ''01 ''then'' 'Jan''

WHEN ''02 ''then'' 'feb''

WHEN ''03 ''then'''mar''

WHEN ''04 ''then'' apr''

WHEN ''05 ''then'' May''

WHEN ''06 ''then'' 'jun''

WHEN ''07 ''then'' 'jul''

WHEN ''08''' then''' aug''

WHEN ''09''' then''' sep''

WHEN ''10''then'' 'oct''

WHEN ''11''' then''' nov''

WHEN ''12'' then'' 'dec''

END

FROM FILE

The above content is an introduction to some of the data migration solutions from Oracle to DB2.

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.