Re: How do I do this? - Mailing list pgsql-sql

From Greg Sabino Mullane
Subject Re: How do I do this?
Date
Msg-id 8a3ceba57e3d59a95af0bd61a1057e44@biglumber.com
Whole thread Raw
In response to How do I do this?  (Wei Weng <wweng@kencast.com>)
List pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I have a table with column filepath with contents that look like the following:
..
> Is there anyway to retrieve the directory information only regarding those
> filepaths?

SELECT rtrim(substring(filepath from '.+/'),'/') FROM mytable;

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200503232033
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFCQhkMvJuQZxSWSsgRAjTaAJ9zmgSOBH/Nre/XMw+JajBni8YyDwCg1DyV
Cd5rIhi026KFoFZEFjMOYvI=
=V9ov
-----END PGP SIGNATURE-----




pgsql-sql by date:

Previous
From: Gary Stainburn
Date:
Subject: Re: best way to swap two records (computer details)
Next
From: Edmund Bacon
Date:
Subject: Re: Self-referencing table question