How to apply a regular expression to a select statement
How to apply a regular expression to a select statement
От:
JORGE MALDONADO <jorgemal1960@gmail.com>
Дата:
Please consider the following situation.
SELECT tar_clave, tar_nombre, tar_dir, tar_vdir FROM cat_tipos_artista
The field "tar_dir" was URL encoded before inserting the record into the database. What I need is to URL decode it right within the SELECT statement and I think that, maybe, this can be achieved by applying a regular expression in such a statement. I will very much appreciate if someone tells me if this is possible and how.
Respectfully,
Jorge Maldonado
Re: How to apply a regular expression to a select statement
От:
"ktm@rice.edu" <ktm@rice.edu>
Дата:
On Tue, Jul 10, 2012 at 12:37:44PM -0500, JORGE MALDONADO wrote: > Please consider the following situation. > > SELECT tar_clave, tar_nombre, tar_dir, tar_vdir FROM cat_tipos_artista SELECT tar_clave, tar_nombre, url_decode(tar_dir), tar_vdir FROM cat_tipos_artista You will need to write the url_decode() function if one does not exist. Regards, Ken