[sql] regex
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Feb 10 11:04:12 CST 2003
on 2/10/03 6:16 AM, Robert Brenstein at rjb at rz.uni-potsdam.de wrote:
> Why the following sql
>
> SELECT r_fna,r_mna,r_lna,r_ema,r_rid
> FROM registration1,registration2b
> WHERE u_rid = r_rid and r_rid > 0 and
> u_mtch LIKE '\broberto\b' and u_mtch LIKE '\bbrenstein\b'
>
> finds match for field containing "robert j brenstein"? robert is not
> roberto, so it should fail in the first LIKE.
>
> When I made the second LIKE non-matching, then the SQL fails as expected.
>
> SELECT r_fna,r_mna,r_lna,r_ema,r_rid
> FROM registration1,registration2b
> WHERE u_rid = r_rid and r_rid > 0 and
> u_mtch LIKE '\brobert\b' and u_mtch LIKE '\bbrensteinson\b'
>
> I am confused. I want to do search on full words.
Sounds like left LIKE works correctly, but problem in AND ?
I will check.
Robert,
Field u_mtch is the same from the same table?
Then this problem should be for simpler query with on FROM table, yes?
Please check this.
May be second table give side effect.
Let me know result
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list