Why do all three of these return a value of 1 in redshift?
select strpos('X', '')
select position('' in 'X')
select charindex('', 'X')
Advertisement
Answer
Because the empty string is the very first part of all strings.
Why do all three of these return a value of 1 in redshift?
select strpos('X', '')
select position('' in 'X')
select charindex('', 'X')
Because the empty string is the very first part of all strings.