Sound of Silence in Snowflake

One of those functions that can be helpful – in the right circumstances – is SOUNDEX. If you hop into the Wayback Machine with Sherman, Mr. Peabody, and me, I created a blog post about this very subject – found here.

In Snowflake, the SOUNDEX function works exactly the same way:

For all the Tony! Toni! Tone! fans

In Snowflake, there is another function that is SOUNDEX-like that can give slightly different results – SOUNDEX_P123.

For those cases where the first and second letters of the string have the same SOUNDEX number, the SOUNDEX_P123 function will keep the number for the second letter. This variant is used in a few other database systems, for example, Teradata.

Notice that it doesn’t have to be the same actual first and second letters – just that it would have the same SOUNDEX number – for the SOUNDEX_P123 value to be different from the SOUNDEX output.

And with that my friends, Sherpa hopes that you have a great time trying out new functions – or seeing how they work differently on different database systems. Sometimes, working with sound can be a good thing…

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.