I am trying to query a column that contains a 6 digit number. For example, if this is my dataset then row 1 and 3 contain a 6 digit number.
我试图查询包含6位数字的列。例如,如果这是我的数据集,则第1行和第3行包含6位数字。
row column_name
1 ID 784651
2 work ID
3 L873009
SELECT REGEXP_SUBSTR("column_name", '([0-9]){6,}')
I thought the above line would work but I get an error that says
我认为上面的行会起作用,但我得到一个错误
The pattern specified is not a valid pattern.
指定的模式不是有效模式。
How do I query for any six digit number in a column?
如何查询列中的任何六位数字?
1 个解决方案
#1
0
[0-9]{6}
instead of ([0-9]){6,}
[0-9] {6}代替([0-9]){6,}
#1
0
[0-9]{6}
instead of ([0-9]){6,}
[0-9] {6}代替([0-9]){6,}