RedditPP Mascot

RedditPP

r/SQL • … • u/Luvs_to_drink

Snowflake SQL Query, what am I doing wrong?

I'm trying to query a table to find all instances where a character repeats at least 5 times in a row.

I've tried:

Select Column From Table where Column REGEXP '(.)\1{4,}'

but it returns nothing.

The table includes the following entries that SHOULD be returned:

1.111111111111E31

00000000000000000

xxxxxxxxxxxxxxxxx

EDIT: Apperently [Snowflake doesn't support backreferences](https://docs.snowflake.com/en/sql-reference/functions-regexp#using-backreferences). so I need to find a new way to accomplish the task. Any ideas?

— 0