svyLookup with custom sort
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Hi all,
I use svyLookup and I would like to sort the results using custom PostgreSQL functionality.
if the words are similar, I want to order by the levenshtein distance between the words.
Is there any way to use a custom sort like this with svyLookup?
I use svyLookup and I would like to sort the results using custom PostgreSQL functionality.
- Code: Select all
ORDER BY CASE WHEN dmetaphone(company_name) = dmetaphone(?) THEN levenshtein(company_name,?) ELSE 0 END,company_name
if the words are similar, I want to order by the levenshtein distance between the words.
Is there any way to use a custom sort like this with svyLookup?