Re: [SQL] 'select where' using multiple columns.

2005-08-05 Thread Hélder M. Vieira
Is there a way to do something like a 'select * where forename_1,forename_2,surname like '%String%' ?? You could try the following, but it won't get a medal for performance... SELECT * FROM xpto WHERE forename_1 LIKE '%String%' OR forename_2 LIKE '%String%' OR surname LIKE '%String%'

Re: [SQL] 'select where' using multiple columns.

2005-08-05 Thread Rob Kirkbride
Ian Johannesen wrote: Hi. Rob Kirkbride wrote: I've got a persons name which is being stored say in 3 columns :- Title, Forename_1, Forename_2, Surname. I want to allow a search say for 'John Smith'. Problem is I can't just break it up into forename and surname because I won't also know. I

Re: [SQL] 'select where' using multiple columns.

2005-08-05 Thread daq
RK> Hi, RK> I've googled around for this but can't see a decent way of doing this : RK> I've got a persons name which is being stored say in 3 columns :- RK> Title, Forename_1, Forename_2, Surname. I want to allow a search say for RK> 'John Smith'. Problem is I can't just break it up into fo

Re: [SQL] 'select where' using multiple columns.

2005-08-05 Thread Ian Johannesen
Hi. Rob Kirkbride wrote: > I've googled around for this but can't see a decent way of doing this : > > I've got a persons name which is being stored say in 3 columns :- > Title, Forename_1, Forename_2, Surname. I want to allow a search say for > 'John Smith'. Problem is I can't just break it up