反馈已提交
网络繁忙
This article provides an example of SQL writing for real-time data using SQL dataset parameters.
Note: Different databases have different writing methods and this article only provides reference examples.
select * from DEMO_CONTRACT where registration time>= PARSEDATETIME('${start year}'||'-'||0||'${start month}'||'-'||'01','yyyy-MM -dd') and registration time<PARSEDATETIME('${as of year}'||'-'||0||'${as of month}'+1||'-'||'01','yyyy- MM-dd')
or:
SELECT * FROM Internet_Access Statistics Table WHERE 1=1 <parameter> and TO_CHAR("Statistic Date",'yyyymm') >=concat('${start year}',case when cast('${start month}' as tinyint)>9 then'${start month}' else concat('0','${start month}') end) and TO_CHAR("statistic date",'yyyymm') <=concat('${as of Year}',case when cast('${up to month}' as tinyint)>9 then'${up to month}' else concat('0','${up to month}') end )</parameter>
select * from new_dian where 1=1 ${if(len(Owned region 2) == 0,"","and Owned region in ('" + Owned region 2 + "')")}
Or: select * from new_dian where 1=1 <parameter> and the area to which it belongs in ('${the area to which it belongs)')</parameter>
Note: where 1=1 means that the condition is always true, to prevent the occurrence of where there will be an error when there is no subsequent parameter condition.
text
售前咨询电话
400-811-8890转1
在线技术支持
在线QQ:800049425
热线电话:400-811-8890转2
总裁办24H投诉
热线电话:173-1278-1526
文 档反 馈
鼠标选中内容,快速反馈问题
鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。
不再提示
10s后关闭