在何处,我如何在bip中使用案例陈述?

发布于 2025-02-02 18:35:55 字数 92 浏览 1 评论 0原文

我如何在bip应用中使用案例statment在哪里并将其比较日期 如果是日期为null显示完整数据,如果他要求特定日期显示他要求的日期的数据

How I can use case statment in BIP App after where and compare it to a date
if is the date is null show Full data if he ask for Specific date display the data for the date that he asked for

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月竹挽风 2025-02-09 18:35:55

不了解这个问题,但是如果您想到在子句中使用情况,那可能是这样的:

--  ...
WHERE
    something = CASE 
                    WHEN Nvl(date_column, To_Date('01.01.2099', 'dd.mm.yyyy') <= other_date_column -- or parameter or date calculation .....    
                    THEN something 
                ELSE 
                    something_else 
                END
--  ...

这取决于您在比较日期之一时要做什么,但是如果是无效的,则可以使用nvl()函数可以创建一个确保超出范围的日期,并将其'='='或'&lt; ='或'&gt; ='或...与比较值。这样,您可以管理扩展并完成工作。这绝对是SQL问题。问候...

Didn't understand the question but if you think of using case in where clause it could be something like this:

--  ...
WHERE
    something = CASE 
                    WHEN Nvl(date_column, To_Date('01.01.2099', 'dd.mm.yyyy') <= other_date_column -- or parameter or date calculation .....    
                    THEN something 
                ELSE 
                    something_else 
                END
--  ...

It depends what you want to do when one of comparing dates is null, but if it is null, you could use Nvl() function to create a date that is for sure out of scope and make it '=' or '<=' or '>=' or ... to the comparing value. This way you can manage the expresion and do the job. This is definitely sql question. Regards...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文