Categories: Snowflake

Cool Stuff in Snowflake – Part 9: ILIKE

I’m doing a little series on some of the nice features/capabilities in Snowflake (the cloud data warehouse). In each part, I’ll highlight something that I think it’s interesting enough to share. It might be some SQL function that I’d really like to be in SQL Server, it might be something else.

Today I have a small blog post about a neat little function I discovered last week – with thanks to my German colleague, who wants to remain anonymous. The function is called ILIKE and it is syntactic sugar for the combination of UPPER and LIKE. Let’s try it out. First we create a small table with some sample data:

Next we want to return all strings starting with “Hello”, so we whip out the LIKE function:

Alas, it returns only one row, because Snowflake is case-sensitive by default. What a treat. Normally you would use UPPER on the column (which is a bad idea in SQL Server, because then no index can be used), but here we can just use the ILIKE function:

Hooray! All three rows returned. ILIKE this function! (Sorry)


------------------------------------------------
Do you like this blog post? You can thank me by buying me a beer 🙂
Koen Verbeeck

Koen Verbeeck is a Microsoft Business Intelligence consultant at AE, helping clients to get insight in their data. Koen has a comprehensive knowledge of the SQL Server BI stack, with a particular love for Integration Services. He's also a speaker at various conferences.

Recent Posts

Webinar – Microsoft Fabric for Dummies

On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about Microsoft…

4 hours ago

Get row counts of all tables in a Microsoft Fabric warehouse

I loaded some built-in sample data from Wide World Importers into a Fabric warehouse. You…

4 days ago

dataMinds Saturday 2024 – Session Materials

It was great being at dataMinds Saturday 2024 this past weekend. A great crowd of…

1 week ago

Check your regions people

Today I was having a nice discussion with some colleagues about Fabric and pricing/licensing came…

3 weeks ago

Book Review – Deciphering Data Architectures

I recently purchased and read the book Deciphering Data Architectures - Choosing Between a Modern…

4 weeks ago

Fabulous Stuff in Fabric – Part 5: Folders in Workspaces

A while ago I had a little blog post series about cool stuff in Snowflake. I’m…

1 month ago