locating all of the 3 digit numbers (1 Viewer)

ConnorGiles

Strange Traveller
Local time
Today, 15:49
Joined
Aug 12, 2014
Messages
1,068
Is there any code to be able to be used within a query to locate the 1,2 or 3 digit numbers?

such as 1 ,11, 111 - 2, 34, 834 etc...

Thanks in Advance

Hope you all have a lovely christmas


Connor
 

pr2-eugin

Super Moderator
Local time
Today, 15:49
Joined
Nov 30, 2011
Messages
8,494
Len() function can do this for you.
Code:
SELECT fieldName 
FROM theTable
WHERE Len(someField) <= 3;
 

ConnorGiles

Strange Traveller
Local time
Today, 15:49
Joined
Aug 12, 2014
Messages
1,068
Thanks Paul!

Catchup?
 

nanscombe

Registered User.
Local time
Today, 15:49
Joined
Nov 12, 2011
Messages
1,082
such as 1 ,11, 111 - 2, 34, 834 etc...

Is there a missing comma between "111" and "-2"?

If the column is numeric you could also try

Code:
SELECT fieldName 
FROM theTable
WHERE abs(someField) < 1000;
 

Users who are viewing this thread

Top Bottom