I'm a big fan of the split function when doing calculated fields. Partly because far too often, the fields from the sources I work with are concatenations of other fields, or even because I've done a union of several CSV sources and some crucial bit of information is hidden in the table name/path. But recently I tried to use this with PostgreSQL and I got the following error
- ERROR: function split_part(text[], unknown, integer) does not exist; Error while executing the query
mid([concat_str],start_of_split, find([concat_str],'/',start_of_split)-start_of_split)where start_of_split is a fixed number of characters (maybe you want to do another find here) and '/' defines the delimiter to use when splitting.
No comments:
Post a Comment