Function syntax comparison between the computing report and the rundry report.

Source: Internet
Author: User

Function syntax comparison between the computing report and the rundry report.

In addition to the core functions of V4.x, integrated computing report 5.0 is optimized and streamlined, and the report function is also properly optimized, here, we will compare the differences between the function syntax of the two.

Comparison function list


1. dataset functions 1.1, ds. group ()

Rundry report:

DatasetName. group (selectExp {, descExp {, filterExp {, sortExp {, groupSortExp {, groupDescExp {, rootGroupExp }}}}}})

Set Computing report:

DatasetName. group (<selectExp >{, filter_exp };{ sort1 }{: order1 },...; {GroupSortExp }:{ groupOrderExp })

Option:

@ R indicates whether to use the root dataset expression.

Major changes:

1. added the @ r function option to replace the parameter of the original rootGroupExp expression;

2. The descExp parameter is used to cancel the sorting order of records before grouping;

3. Change the syntax of the sort expression and sort order parameters.

 

Example:


1.2. ds. select ()/ds. select1 ()

Rundry report:

DatasetName. select (<select_exp >{, desc_exp {, filter_exp {, sort_exp {, rootGroupExp }}}})

DatasetName. select1 (selectExp {, filterExp {, rootGroupExp }})

Set Computing report:

Combine the original ds. select () and ds. select1 () into ds. select (). The syntax is as follows:

DatasetName. select (<select_exp >{: order_exp}, {filter_exp}, {num_exp}, {distinct_exp })

Option:

@ R indicates whether to use the root dataset expression.

 

Major changes:

1. added the @ r function option to replace the parameter of the original rootGroupExp expression;

2. The descExp parameter is used to cancel the data sorting order;

3. Change the sequence Parameter syntax.

 

Example:

1.3, ds. sum ()

Rundry report:

DatasetName. sum (selectExp {, filterExp {, rootGroupExp }})

Set Computing report:

DatasetName. sum (selectExp {, filterExp })

Option:

@ R: root dataset expression?

 

Major changes:Add the @ r function option to replace the parameter of the original rootGroupExp expression.

 

Example:

2. Cell functions 2.1, call ()/call2 ()

Rundry report:

Call (sqlStatement {, arg1 {, arg2 {, arg3 {,......}}}})

Call (dbName, sqlStatement {, arg1 {, arg2 {, arg3 {,......}}}})

Set Computing report:

Combine the original call () and call2 () into call (). The syntax is as follows:

Call (sqlStatement {, arg1 {, arg2 {, arg3 {,......}}}} {; DbName })

 

Major changes:The Data Source Parameter order is changed and used as an optional parameter.

 

Example:

2.2. if ()

Rundry report:

If (boolExp1, valueExp1 {, boolExp2, valueExp2 {, boolExp3, valueExp3 {, {defaultExp }}}})

Set Computing report:

If (x1: y1 ,..., Xk: yk; y)

Major changes:Function parameter delimiter change.

 

Example:

2.3, nvl ()

Rundry report:

Nvl (valueExp1, valueExp2)

Set Computing report:

Interferon (valueExp1, valueExp2)

 

Major changes:Function name change.

 

Example:

2.4, sum ()

Rundry report:

Sum (expression)

Sum (cellExp, exp)

Set Computing report:

Sum (expression)

Sum (cellExp, exp)

Major changes:None.

 

Example:

2.5, value ()

Indicates the value of the current cell. The usage of the Set Computing report is the same as that of the rundry report.

3. Time and date functions 3.1 and date ()

Rundry report:

Date (stringExp)

Set Computing report:

Date (stringExp)

Date (year, month, day)

 

Major changes:Adds the function parameter type.

 

Example:

3.2, datetime ()/datetime2 ()

Rundry report:

DateTime (string)

DateTime (long)

Datetime2 (string, format)

Set Computing report:

Merge the original dateTime () and dateTime2 () into datetime (). The syntax is as follows:

Datetime (string)

Datetime (long)

 

Major changes:None.

 

Example:

3.3. daysAfter ()

Rundry report:

DaysAfter (dateExp1, dateExp2)

Set Computing report:

Interval (datetimeExp1, datetimeExp2)

Option:

@ Y calculate the difference between two datetime data types for several years;

@ Q calculate the difference between two date and time data for a few quarters;

@ M calculates the difference of several months between two date and time data;

@ S calculates the difference of several seconds between two datetime data types;

@ Ms calculate the difference between two date-time data in milliseconds;

@ R calculate two date-time data intervals and return real numbers;

By default, two date-time data types are calculated for a few days.

Major changes:

1. function name changes;

2. added several function options to meet different needs.

 

Example:

 

3.4, lastday ()/lastmonth ()/lastyear ()/relDate ()/relTime ()

Rundry report:

Lastday (dateExp)

Lastmonth (dateExp)

Lastyear (dateExp)

RelDate (dateExp, nExp)

RelTime (datetimeExp, nExp)

Set Computing report:

Combine the original lastday ()/lastmonth ()/lastyear ()/relDate ()/relTime () into afert (). The syntax is as follows:

After (dateExp, n)

Option:

@ Y calculate the new date data with a difference of n years from the specified date;

@ Q calculate the new date data with a date difference of n quarters;

@ M calculate the new date data with a difference of n months from the specified date;

@ S calculate the new date and time data with a difference of n seconds from the specified date;

@ Ms calculate the new date and time data with a difference of n milliseconds from the specified date;

Missing time indicates calculating the new date data after n days of the given date.

 

Major changes:

1. function name changes;

2. added several function options to meet different needs.

 

Example:

3.5. monthbegin ()/monthend ()/queterbegin ()/quaterend ()/weekbegin ()/weekend ()

Rundry report:

Monthbegin (dateExp)

Monthend (dateExp)

Quaterbegin (dateExp)

Quaterend (dateExp)

Weekbegin (dateExp)

Weekend (dateExp)

Set Computing report:

Merge the original monthbegin ()/monthend ()/queterbegin ()/quaterend ()/weekbegin ()/weekend () into pdate (). The syntax is as follows:

Pdate (dateExp)

Option:

@ W obtain the Sunday of the week where the specified date is located;

@ We get the week of the specified date;

@ M: Obtain the beginning of the month of the specified date;

@ Me: Obtain the end of the month with the specified date;

@ Q: obtain the first day of the quarter where the specified date is located;

@ Qe gets the end of the quarter where the specified date is located;

The default value is Sunday of the week where the specified date is located.

 

Major changes:

1. function name changes;

2. added several function options to meet different needs.

 

Example:

4. String function 4.1, like ()

Rundry report:

Like (stringExp, formatExp {, ignoreCase })

Set Computing report:

Like (stringExp, formatExp {, ignoreCase })

 

Major changes:None.

 

Example:

4.2. rplc ()

Rundry report:

Rplc (srcExp, subStrA, rplcStrB {, boolExp })

Set Computing report:

Replace (src, a, B)

Option:

@ Q: The characters in quotation marks do not need to be replaced.

 

Major changes:

1. function name changes;

2. Add the @ q option to replace the original boolExp parameter so that the characters in the quotation marks do not need to be replaced.

 

Example:

4.3. split ()

Rundry report:

Split (srcExp, sepExp {, boolExp })

Set Computing report:

Split (srcExp, sepExp {, boolExp })

 

Major changes:None.

 

Example:

5. Data type conversion functions 5.1 and str ()

Rundry report:

Str (expression {, format })

Set Computing report:

String (expression {, format })

 

Major changes:Function name change.

 

Example:



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.