Search Postgresql Archives

Re: find a string contained in an attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks a lot for your help that's exactly what I wanted. It worked fine.

regards,

karina

On Wed, Mar 24, 2010 at 3:25 PM, Szymon Guz <mabewlun@xxxxxxxxx> wrote:
2010/3/24 Karina Guardado <kguardado@xxxxxxxxx>

Hi,

I want to know if it is possible to search for a string of characters inside an attribute for example I have the following table and values

cod_unidad |                 nombre_uni                 
------------+---------------------------------------------
          1 | Facultad de Ciencias Naturales y Matemática
          2 | Facultad de Ciencias Humanidades
          3 | Facultad de Ingeniería
          4 | Facultad de Agronomía
          5 | Oficinas Centrales
          6 | test


I want to retrieve all the rows where I find the word Ciencias for example. Is there a function or with select is possible to do it?

thanks in advance,

karina
El Salvador, Centroamerica

For example something like this should work:

SELECT * FROM table WHERE nombre_uni like '%Ciencias%';

more you can find here: http://www.postgresql.org/docs/8.4/interactive/functions-matching.html

regards
Szymon Guz


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux