views:

24

answers:

2

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.

+1  A: 

Does Cognos even have an InStr? I've always used Position 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.

paxdiablo
Thanks for the help. Yes, we ported the instr function from Oracle and I haven't had issues in the past. I usually use the field in the function, so I don't think I should be quoting that, but I will give it a shot. I suspect that it has to do with the @ symbol but I am not sure.
Btibert3