Conversion of the built-in function Oracle in SQL finishing

The program which often is the Oracle database support, and support for SQL database. While some Oracle built-in function by more, but in SQL the syntax is slightly different, I made some arrangement, I hope everyone can help. . . .


The built-in function in 1.oracle:
The round function in Oracle (four to five homes in (SQL) can also be used)
Oracle TRUNC returns the date of[00:00:00]
Oracle floor floor (n), the largest integer less than or equal to the value of the n (SQL can also be used)
The length function sqlserver in Oracle is len
The datalength function sqlserver in Oracle is datalength
The lob_to_char function in Oracle to convert(char,opertime,120)
The to_char function in Oracle to convert(char,opertime,120)
The substr function in Oracle to substring
For example: select convert(char, getdate(), 120) --yyyy-mm-dd hh:mm:ss(24h)
convert(char,SubmitTime,120)= convert(char,getdate(),120)
Oracle floor (sysdate - TRUNC (opertime) to DateDiff(dd,convert(varchar(100),InputDate,111),convert(varchar(100),getdate(),111))
Oracle dbms_lob.getlength to datalength (SQLSERVER database Clob type to NText type)
Oracle ROWNUM to row_number (OVER) (ORDER BY XX) and must have an top SQL statement
For example: SQL method:
SELECT * FROM (
SELECT A.*, row_number() OVER(ORDER BY A.MATTERID ) as RN FROM (
SELECT * FROM ATTACHMENT_T ) A
)T WHERE RN <= 20 AND RN >=0


The 2.Oacle system table dual
Card dual of sqlserver directly removed


3 the error encountered and Solutions:
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
Model changes inside the constructor, assign a value to a property of type DateTime
ElementContent_Model, OperLog_Model

Posted by Godfery at November 21, 2013 - 11:44 AM