function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Is it possible to define a range to match in SOQL (like t-sql)?
For example Where not(name like 'P[0-9]%') ?
What shall be output of you example
Input:
p12345
p23455
p09865
PD121212
H9999
h4444
Expected output of my example
PD121212
Actual Output of my example:
h4444
SOQL supports the LIKE operator and allows for basic regex, but not something like this. See the API docs for more info.
Weird. It will run it happily without any error messages but not return what I expect.
Thanks for the reply.
It will work, but just not include record which starts with P[0-9].
for records like: P[0-9]1223, P[0-9]556, etc, which ever starts with P[0-9]
This is an ugly hack, but it will accomplish your goal:
Where (not (name like 'P0%' or name like 'P1%' or name like 'P2%' or name like 'P3%' or name like 'P4%' or name like 'P5%' or name like 'P6%' or name like 'P7%' or name like 'P8%' or name like 'P9%'))
What shall be output of you example
Input:
p12345
p23455
p09865
PD121212
H9999
h4444
Expected output of my example
PD121212
H9999
h4444
Actual Output of my example:
p12345
p23455
p09865
PD121212
H9999
h4444
SOQL supports the LIKE operator and allows for basic regex, but not something like this. See the API docs for more info.
Weird. It will run it happily without any error messages but not return what I expect.
Thanks for the reply.
It will work, but just not include record which starts with P[0-9].
for records like: P[0-9]1223, P[0-9]556, etc, which ever starts with P[0-9]
This is an ugly hack, but it will accomplish your goal:
Where (not (name like 'P0%' or name like 'P1%' or name like 'P2%' or name like 'P3%' or name like 'P4%' or name like 'P5%' or name like 'P6%' or name like 'P7%' or name like 'P8%' or name like 'P9%'))