Query Criteria - text only (1 Viewer)

Leo_Polla_Psemata

Registered User.
Local time
Today, 09:48
Joined
Mar 24, 2014
Messages
364
Hi
I have a field, say ALFA, field size 3, type of value is text but some text contains 3 digits which i don't need to calculate so ALFA is text.



I would like to make a query that filters these records where ALFA does have ONLY letters, not diggits.


Example
Record1, ALFA = ABC
Record2, ALFA = 123
Record3, ALFA = DEF
Record4, ALFA = 456


I need a criteria that will fetch only the Record1 and Record3.


Do you have any good idea ?
 

bob fitz

AWF VIP
Local time
Today, 16:48
Joined
May 23, 2011
Messages
4,717
Try:
Code:
SELECT Table1.ALFA
FROM Table1
WHERE (((IsNumeric([ALFA]))<>True));
You will need to replace "Table1" with the Name of your table.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:48
Joined
Oct 29, 2018
Messages
21,358
Hi. Would it be possible to have a mixture of both alpha and numeric digits?

A21
34B
etc.
 

bob fitz

AWF VIP
Local time
Today, 16:48
Joined
May 23, 2011
Messages
4,717
Hi. Would it be possible to have a mixture of both alpha and numeric digits?

A21
34B
etc.
If it would be possible, just change the WHERE statement to:

WHERE (((IsNumeric([ALFA]))=False));
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 09:48
Joined
Mar 24, 2014
Messages
364
Many thanks
This
WHERE (((IsNumeric([ALFA]))=False));
and this
WHERE (((IsNumeric([ALFA]))<>True));
have solved my puzzle of the day.



About this
A21
34B
So far i haven't met such case, believe the "numeric false" will remove it.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:48
Joined
Oct 29, 2018
Messages
21,358
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Micron

AWF VIP
Local time
Today, 12:48
Joined
Oct 20, 2018
Messages
3,476
Either of these would also work if it's your style (I probably think more along these lines)
Code:
SELECT FieldName FROM tblName WHERE Isnumeric([FieldName]);
Code:
SELECT FieldName FROM tblName WHERE Not Isnumeric([FieldName]);
 

Users who are viewing this thread

Top Bottom