0

I want to

SELECT * FROM table1 WHERE name=petter

Now if there is many type of petter in table like PETTER , Petter And petter.

Want all this three (PETTER, Petter, petter) to be considered which command is for this in cognos report studio?

Or in DB2 without using 'IN' function.

Phoenix
  • 1,045
  • 1
  • 14
  • 22
Raj
  • 21
  • 2
  • 5

1 Answers1

1

I think you want UPPER (or LOWER, the effect should be the same):

SELECT *
FROM table1
WHERE UPPER(name) = 'PETTER'

Remember, though, if you have an index on name, then this won't be able to use that index. You can create (at least if you're on z/OS) an index with that function. On other platforms, you can create a generated column and create index on that.

bhamby
  • 15,112
  • 1
  • 45
  • 66