On Thu, Jul 31, 2008 at 12:54:02PM +0100, Brandon, Nicholas (UK) wrote:
> select * from current as x, current as y where x.last_name = y.last_name
> and x.ind_id != y.ind_id and x.first_name like substr(y.first_name, 0,2)
> 
> In my english I was trying to write "match where the first name of x
> begins with the first two characters of y first name". Using a literal
> example for above the SQL would end: where x.first_name like 'da%'

Your query does not include the % your literal example does.

Alternatively, you could get substr from both and just say =.

Cheers, Peter
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to