sql server to oracle

When SqlServer sql statement conversion from Oracle, what to look for
dates:
0. acquisition system time getdate () SYSDATE to
1. conversion date string TO_CHAR (SYSDATE, 'YYYY-mm-dd')
2. Date The date taken the trunc (SYSDATE)
3. date string transfer, need TO_DATE (SYSDATE, 'YYYY-mm-dd HH24: mi The: SS')
4. date of the DATEADD subtraction can not be used, directly +, sysdate-1, sysdate + 365
5. after subtraction date, there will be many decimal places, to be noted that the interception
sql syntax:
0. @ foregoing parameters are not, use:
1. string not connected to + || switch
2. when there is no statement from using from dual
rear 3.sql statement can not have a semicolon (I guess .net will be added later in the implementation of two consecutive, consecutive two on the error)
function:
0.isnull changed NVL
1. not convert type with cast, can be replaced with trunc and to_char
other:
the Add the Parameter time, and may be related to the order, pay attention to the left join, use nvl, otherwise error-prone
----------------
copyright: This article is the original article CSDN bloggers "KrisKing", and follow CC 4.0 BY-SA copyright agreements, please attach a reprint The original source link and this statement.
Original link: https: //blog.csdn.net/krisking/article/details/43270797

Guess you like

Origin www.cnblogs.com/shuihaya/p/12167974.html