如何在字符串中使用分号 [英] How using semicolon in a string
本文介绍了如何在字符串中使用分号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个不知道如何解决的问题。我做了一些研究,但没有找到任何东西。
I have an issue I don't know how to resolve. I did some research but I didn't find anything about it.
我的问题是:
sum(z.SICO_Subscribed_offers__c = JOU; SE然后1 else 0 end的情况)= 1
当我使用像这样的ia字符串这样的分号时,以下错误:
sum(case when z.SICO_Subscribed_offers__c = "JOU;SE" then 1 else 0 end) = 1
When I use a semicolon like this i a string I get the following error:
⛔️检查查询语法时发生错误。错误:;是保留字,可能不会出现在查询中。
我绝对需要写 ;
在字符串中。我该怎么办?
I absolutly need to write ;
in the string. What can I do ?
感谢帮助!
推荐答案
字符串常量用单引号'
在SQL中。双引号用于标识符 JOU; SE
是列的名称。
String constants need to be enclosed in single quotes '
in SQL. Double quotes are for identifiers "JOU;SE"
is the name of a column.
sum(case when z.SICO_Subscribed_offers__c = 'JOU;SE' then 1 else 0 end) = 1
这篇关于如何在字符串中使用分号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文