SELECT Assertion [英] SELECT Assertion

查看:71
本文介绍了SELECT Assertion的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用断言在SELECT子句中返回一个布尔值。 工作代码如下所示,但它使用CASE语句,我发现它非常笨拙:

展开 | 选择 | 换行 | 行号

解决方案

嗨试试这个

展开 | 选择 | Wra p | 行号


< blockquote>嗨Romi。


不幸的是,这不是断言(根据要求),而只是编写CASE语句的另一种方式。我知道如何使用CASE语句(如我的第一篇文章所示)。我想要找的是等同的断言


无论如何,谢谢你提供时间提出建议:)


修改您的第一个示例代码。试试这是否有效

展开 | 选择 | Wrap | 行号


I am trying to return a boolean value within a SELECT clause using an assertion. The working code is below, but it uses a CASE statement which I find quite clumsy :

Expand|Select|Wrap|Line Numbers

解决方案

hi try this

Expand|Select|Wrap|Line Numbers


Hi Romi.

Unfortunately this is not an assertion (as requested), but just another way of writing the CASE statement. I know how to use a CASE statement (as shown in my first post). What I''m looking to find is an equivalent assertion.

Thank you anyway for offering your time to make the suggestion :)


Modifying your fist sample code. Try if this works

Expand|Select|Wrap|Line Numbers


这篇关于SELECT Assertion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆