当我将案例表达式传递到last_value函数时会发生什么
我的last_value函数看起来像这样
-
last_value( 案件 当语句_1然后0 当语句_2然后1 当语句_3然后0 否则 端忽略nulls)(按第1列订购按列2)
有人可以解释如果有表达情况,应该返回的last_value是什么值。 我了解通过一列经过时会发生什么,但是这些表达式没有任何线索。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在
问候...
顺便提一句。情况...端结构就像您从表字段中选择值一样,但使用条件。它不会影响last_value函数。
这样的是这样:
ID = 1的情况,然后10时ID = 2,然后20 else 99结束
其中id = 1是语句1,id = 2是语句2 ...等等。
You can find the description and examples at https://docs.oracle.com/cd/E11882_01/server.112/e41084/functions085.htm#SQLRF00655
Regards...
Btw. the CASE ... END structure is just as you are selecting values from the table field but with If condition. It doesn't affect the LAST_VALUE function.
It is something like this:
CASE WHEN ID = 1 THEN 10 WHEN ID = 2 THEN 20 ELSE 99 END
where ID = 1 is Statement1, ID = 2 is Statement2 ... and so on..
就像您的案例表达方式本身一样...
The same as if your case expression were itself a column...