Link to home
Start Free TrialLog in
Avatar of Denis Orozco
Denis OrozcoFlag for United States of America

asked on

wildcharacter search in a where clause

Hi tere,
what's the best practices to include this where clause in my stored procedure
and SUBSTRING(R.glrf_full_acct,15, 3)not like '81.[0-9][0-9][0-9][0-9].[0-9][0-9][0-9][0-9][0-9].207%,'

Open in new window


I'm searching specifically for numbers that starts with 81 and follow by any number in any of those position but after the 15 character has a 207
Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Denis Orozco

ASKER

That is true but I need to make sure the first two are 81. I do happen to have 207 with a different starting set of numbers
How about this one?
WHERE ISNUMERIC(R.glrf_full_acct)=1 AND LEFT(R.glrf_full_acct,2)='81' AND SUBSTRING(R.glrf_full_acct,15, 3) = '207'

Open in new window