On 9/18/2015 9:05 AM, Charles Leifer wrote: > As a challenge I was curious how one would write a recursive CTE to take a > substring and recursively calculate all possible matches. I realize I could > just use 'LIKE xxx%' to accomplish the same, but if anyone has any thoughts > on writing such a query I'd love to hear them!
Something along these lines (untested): select group_concat(substr(word, length(:prefix)+1, 1), '') from words where substr(word, 1, length(:prefix)) = :prefix Not sure what recursive CTE has to do with it - what is there to recurse over? -- Igor Tandetnik