指令功能 Cognos 报告
我试图在字符串字段中找到@。 Congos 8 中的以下数据项会
0
为每次调用返回。
instr
(
[email protected], '@', 1
)
有什么想法吗?一般来说,Cognos 和 Oracle 都是新手,但我觉得我必须遗漏一些明显的东西。
I am trying to find the @ in a string field. The follow data item in a Congos 8 returns
0
for every call.
instr
(
[email protected], '@', 1
)
Any ideas? New to Cognos and Oracle in general but I feel like I have to be missing something obvious.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Cognos 是否有
InStr
?我一直使用Position
来实现这一点。再深入一点,就会发现
InStr
是一个 Oracle 函数,但我不确定数据库和 Cognos 之间的相互作用,因为我们只是使用数据库来获取数据,所有用户数据的操作完全由 Cognos 端为我们处理。但是,即使这工作正常,在我看来你的第一个论点也应该被引用,是吗?毕竟它应该是一个字符串。
Does Cognos even have an
InStr
? I've always usedPosition
for this.A little more digging reveals
InStr
as an Oracle function but I'm not sure on the interplay between the database and Cognos since we just use the database for getting data, all user manipulations of the data are handled purely on the Cognos side for us.But, even if that worked properly, it seems to me that your first argument should be quoted as well, yes? It is supposed to be a string after all.
如果您只是想知道那里是否有@符号,您可以执行以下操作(此处它会出现在过滤器中):
如果您想要@的位置作为一个值来执行某些操作,您可以可以做这样的事情(这里它会出现在数据项表达式中):
请注意,您要查找的值需要首先出现,您要查找的字符串其次出现。
If you just want to know if there is an @ sign in there, you can do something like this (here as it would appear in a filter):
If you want the position of the @, as a value to do something with, you can do something like this (here as it would appear in a Data Item Expression):
Note that the value you're looking for needs to appear first, the string you're looking in second.