Totti
Valued Member
Points: 58
More actions
October 25, 2006 at 3:45 am
#67762
Hey all i have a query much like this
SELECT * FROM tbl_test
WHERE testname LIKE '%Jay%'
this works..it selects the user Jay if i type in jay but if i type in 'Jay ' with a space the query doesnt work..any ideas on how i can solve this ??
ijaz
SSCommitted
Points: 1912
October 25, 2006 at 5:41 am
#667809
hi,
used the builtin funtions LTRIM, RTRIM to trim the extra spaces on the left or right side.
hope this will slove your problem
thanks
cheers
debrucer1
SSCertifiable
Points: 5366
October 25, 2006 at 6:44 pm
#668060
but beware of that leading %... causes full scan of table.
Thank-you,David RussellAny Cloud, Any Database, Oracle since 1982
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply