Hi Trausti / Philippe,

you should be careful if you have more than one database field in an expression, you should check for NULL values first. Normally (depends on the SQL / DB Engine used) NULL || 'bla' results in NULL (As do 1 + NULL or even "fieldname = NULL" (-> this is not true neither false! - Use IS NULL instead!)). You can use a COLAESCE-Function, if present or a CASE (sometimes IIF) statement. Some DB engines also have a special operator for NULL-aware string concatenation.

kind regards
Tobias

nopapers.org_pri schrieb:
Hello,

On a MySql database, you could use a FullText index wich provide google like 
search facilities.

On Real Database (sqlite) you can try something like:

select * from tables where Firstname || ' ' || Lastname = 'Trausti Thor Johannsson'

Philippe

On Tue, 29 Aug 2006 12:09:33 +0200, Trausti Thor Johannsson <[EMAIL PROTECTED]> 
wrote:
I have a little problem.

I have a database with Firstname and Lastname.  How do I combine them
to search for full names ?

For example, take my name,

Firstname = Trausti Thor
Lastname = Johannsson


How would I search for "Trausti Thor Johannsson" ??  Remember, some
people might have entered the data like this :

Firstname = Trausti
Lastname = Thor Johannsson


So I need to combine the fields somehow.  And need to do this with
one sql select statement.


Best regards,


Trausti
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to