How to display only records that have numbers in column

Chakra shared this question 11 months ago
Answered

Hi,

Hope things are going alright.

I'd like to know if there is a way to display only records that have numbers in field values?

Example:

Tag Number (Field)

GS356785

MW26598

1234567

987654

TSD58896

1234HG22

1234

From the 'Tag Number' Field above, I'm interested to only see Tag numbers which are numbers

Tag Number

1234567

987654

1234

Appreciate your feedback.

Thank you,

Chakra

Comments (4)

photo
1

Anything for me please?

photo
1

Hi Chakra,

Your best bet would be some sort of free-hand statement, where you check to see if the value can be casted as a number:

https://stackoverflow.com/questions/14719760/sql-server-check-to-see-if-cast-is-possible


Hope this helps.

Regards,

Nathan

photo
1

Thank you Nathan. This is helpful.

photo
1

No problem!