Select

Started by Marcelo Pereiraabout 24 years ago3 messagesgeneral
Jump to latest
#1Marcelo Pereira
gandalf@sum.desktop.com.br

Hello all,

How can I select from a table all the tupples with a specific word?

Ex.: I have a table like this:

1 | 'Jose' Carlos Santos
2 | Maria 'Jose' Pinheiro
3 | Joaquim 'Jose' Castro
4 | Marcelo Pereira Sa
5 | Chuck Hagen
6 | John 'Jose' Pinto

I would like to select all the tupples with the work 'Jose'. So, the
tupples: 1,2,3 and 6.

Thanks in advance,

[ ]'s

Marcelo Pereira

-- Remember that only God and Esc+:w saves.
__
(_.\ Marcelo Pereira |
/ / ___ |
/ (_/ _ \__ Matematica/99 - IMECC |
_______\____/_\___)___Unicamp_______________/

#2Lee Kindness
lkindness@csl.co.uk
In reply to: Marcelo Pereira (#1)

See:

http://www.postgresql.org/idocs/index.php?functions-matching.html

In your case SELECT * FROM xxx WHERE name LIKE '%Jose%';

Lee.

Marcelo Pereira writes:

Show quoted text

How can I select from a table all the tupples with a specific word?

Ex.: I have a table like this:

1 | 'Jose' Carlos Santos
2 | Maria 'Jose' Pinheiro
3 | Joaquim 'Jose' Castro
4 | Marcelo Pereira Sa
5 | Chuck Hagen
6 | John 'Jose' Pinto

I would like to select all the tupples with the work 'Jose'. So, the
tupples: 1,2,3 and 6.

#3Bo Lorentsen
bl@netgroup.dk
In reply to: Marcelo Pereira (#1)
Re: Select

tor, 2002-01-24 kl. 14:34 skrev Marcelo Pereira:

I would like to select all the tupples with the work 'Jose'. So, the
tupples: 1,2,3 and 6.

How about :

SELECT id,name FROM name_table WHERE name LIKE '%Jose%'

Btw. I really think this question belongs to the "Novice" mail list.

/BL