Thanks for the input, I think I get this now. In my case, the query SELECT DISTINCT ON (substring(attribute from '^http://[^/]*/')) attribute from pg_atp where attribute like 'http://%' doesn't get me just the root of the URL, but the whole URL - but only for the first row for each individual root. While SELECT DISTINCT substring(attribute from '^http://[^/]*/') from pg_atp where attribute like 'http://%' does what I first intended - get a list of all (distinct) root URLs. Wieder was gelernt. (Learnt something again. :-) best regards, Christoph Am 08.08.2006 um 20:36 schrieb Ben:
|
- [GENERAL] DISTINCT to get distinct *substrings*? Christoph Pingel
- Re: [GENERAL] DISTINCT to get distinct *substring... Nikolay Samokhvalov
- Re: [GENERAL] DISTINCT to get distinct *subst... Ben
- Re: [GENERAL] DISTINCT to get distinct *s... Christoph Pingel
- Re: [GENERAL] DISTINCT to get distinct *subst... Christoph Pingel