Skip to content
Advertisement

ILIKE and NOT ILIKE in aws redshift different from total

I ran three following queries in amazon redshift:

The count was 1554.

The count was 62.

The count was 85.

The last two (62 + 85) should equal 1554. What am I missing?

Advertisement

Answer

Double-quotes are for identifiers: "myColumn"
Single quotes are for values: 'value'.

Your examples contradict those basic syntax rules.

Also, you did not consider NULL values, which neither qualify with:

nor with:

What do you get for:

~~* .. internal Postgres operator for ILIKE
!~~* .. internal Postgres operator for NOT ILIKE
(Careful: slightly different operator precedence.)

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement