Re: name and surname in a single field
On 1 Oct, 18:25, alessandro.sta...@gmail.com (Ale Stanga) wrote:
> Peter H. Coffin <hell...@ninehells.com> wrote:
>
> > "*" is not a LIKE wildcard. "%" and "_" are LIKE wildcards.
>
> my query is:
> rs.open "select artista, substring(artista, locate(artista, ' ') as
> surname , online from artisti where online = 'S' having surname like
> 'W%' order by surname asc" , conn
>
> but "Andy Warhold" is in the database in the ARTISTA field.
> where's the problem?
> thanks, Ale.
Wouldn't it be easier to say
SELECT
artista,
substring(artista, locate(artista, ' ') as surname,
online
FROM artisti
WHERE online = 'S' AND artista LIKE '% W%'
ORDER BY surname ASC
|