search
HomeDatabaseMysql Tutorial集算报表与润乾报表的函数语法对比

集算报表5.0在保留润乾报表V4.x的核心功能外,进行了优化和精简,其中报表函数也做了适当优化,这里就常见计算来比较一下二者函数语法之间的差异。 对比函数一览表 1、数据集函数 1.1、ds.group() 润乾报表: datasetName.group(selectExp{,descExp{,filterE

集算报表5.0在保留润乾报表V4.x的核心功能外,进行了优化和精简,其中报表函数也做了适当优化,这里就常见计算来比较一下二者函数语法之间的差异。

对比函数一览表

\

1、数据集函数

1.1、ds.group()

润乾报表:

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

集算报表:

datasetName.group({,filter_exp};{sort1}{:order1},…;{groupSortExp }:{ groupOrderExp })

选项:

@r 是否root数据集表达式。

主要改变:

1、 增加@r函数选项,取代原rootGroupExp表达式参数;

2、 取消分组前记录的排序顺序descExp参数;

3、 更改排序表达式和排序顺序参数语法。

举例:

\

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

润乾报表:

datasetName.select( {,desc_exp{, filter_exp{, sort_exp{,rootGroupExp}}}} )

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

集算报表:

将原ds.select()和ds.select1()合并为ds.select(),语法如下:

datasetName.select({:order_exp},{ filter_exp },{num_exp},{distinct_exp})

选项:

@r 是否root数据集表达式。

主要改变:

1、 增加@r函数选项,取代原rootGroupExp表达式参数;

2、 取消数据的排序顺序descExp参数;

3、 更改排序顺序参数语法。

举例:

\

1.3、ds.sum()

润乾报表:

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

集算报表:

datasetName.sum(selectExp{,filterExp})

选项:

@r 是否root数据集表达式

主要改变:增加@r函数选项,取代原rootGroupExp表达式参数。

举例:

\

2、单元格函数

2.1、call()/call2()

润乾报表:

call(sqlStatement{,arg1{,arg2{,arg3{,……}}}})

call(dbName,sqlStatement{,arg1{,arg2{,arg3{,……}}}})

集算报表:

将原call()和call2()合并为call(),语法如下

call(sqlStatement{,arg1{,arg2{,arg3{,……}}}}{;dbName})

主要改变:数据源参数顺序改变,并作为可选参数。

举例:

\

2.2、if()

润乾报表:

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

集算报表:

if(x1:y1,…,xk:yk;y)

主要改变:函数参数分隔符变化。

举例:

\

2.3、nvl()

润乾报表:

nvl( valueExp1, valueExp2 )

集算报表:

ifn( valueExp1, valueExp2 )

主要改变:函数名称变化。

举例:

\

2.4、sum()

润乾报表:

sum(expression)

sum(cellExp,exp)

集算报表:

sum(expression)

sum(cellExp,exp)

主要改变:无。

 

举例:

\

2.5、value()

表示当前单元格的值,集算报表与润乾报表用法相同,没有改变。

3、时间日期函数

3.1、date()

润乾报表:

date(stringExp)

集算报表:

date(stringExp)

date(year,month,day)

主要改变:增加函数参数类型。

举例:

\

3.2、datetime()/datetime2()

润乾报表:

dateTime(string)

dateTime(long)

datetime2(string, format)

集算报表:

将原dateTime()和dateTime2()合并为datetime(),语法如下

datetime(string)

datetime(long)

主要改变:无。

举例:

\

3.3、daysAfter()

润乾报表:

daysAfter(dateExp1, dateExp2)

集算报表:

interval (datetimeExp1,datetimeExp2)

选项:

@y 计算两个日期时间型数据相差几年;

@q 计算两个日期时间型数据相差几季度;

@m 计算两个日期时间型数据相差几月;

@s 计算两个日期时间型数据相差几秒;

@ms 计算两个日期时间型数据相差几毫秒;

@r 计算两个日期时间型数据间隔,返回实数;

缺省为计算两个日期时间型数据相差几天。

主要改变:

1、 函数名称变化;

2、 增加了若干函数选项,以满足不同需要。

举例:

\

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

润乾报表:

lastday(dateExp)

lastmonth( dateExp )

lastyear( dateExp )

relDate(dateExp, nExp)

relTime(datetimeExp, nExp)

集算报表:

将原lastday()/lastmonth()/lastyear()/relDate()/relTime()合并为afert(),语法如下

after (dateExp, n)

选项:

@y 计算与指定日期相差n年的新日期数据;

@q 计算与指定日期相差n季度的新日期数据;

@m 计算与指定日期相差n月的新日期数据;

@s 计算与指定日期相差n秒的新的日期时间数据;

@ms 计算与指定日期相差n毫秒的新的日期时间数据;

缺省时表示算出给定日期n天后的新日期数据。

主要改变:

1、 函数名称变化;

2、 增加若干函数选项以满足不同需要。

 

举例:

\

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

润乾报表:

monthbegin( dateExp )

monthend( dateExp )

quaterbegin( dateExp )

quaterend( dateExp )

weekbegin(dateExp)

weekend(dateExp)

集算报表:

将原monthbegin()/monthend()/queterbegin()/quaterend()/weekbegin()/weekend()合并为pdate(),语法如下

pdate (dateExp)

选项:

@w 获得指定日期所在星期的星期天;

@we 获得指定日期所在星期的星期六;

@m 取得指定日期所在月的月首;

@me 取得指定日期所在月的月末;

@q 取得指定日期所在季度的首日;

@qe 取得指定日期所在季度的末日;

缺省为获得指定日期所在星期的星期天。

主要改变:

1、 函数名称变化;

2、 增加若干函数选项以满足不同需要。

举例:

\

4、字符串函数

4.1、like()

润乾报表:

like( stringExp, formatExp{, ignoreCase} )

集算报表:

like( stringExp, formatExp{, ignoreCase} )

主要改变:无。

举例:

\

4.2、rplc()

润乾报表:

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

集算报表:

replace( src,a,b)

选项:

@q 引号里的字符不需要进行替换

主要改变:

1、 函数名称变化;

2、 增加@q选项替代原boolExp参数,使引号里的字符不需要进行替换。

举例:

\

4.3、split()

润乾报表:

split( srcExp,sepExp{,boolExp})

集算报表:

split( srcExp,sepExp{,boolExp})

主要改变:无。

举例:

\

5、数据类型转换函数

5.1、str()

润乾报表:

str(expression{, format})

集算报表:

string(expression{, format})

主要改变:函数名称变化。

举例:

\


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor