Skip to content
Advertisement

How do identify the first character of a string as numeric or character in SQL

I need to identify the first character in my data as numeric or character in SQL Server. I am relatively new to this and I don’t know where to begin on this one. But here is what I have done to this point. I had data that looked like this:

I used the right function to remove the ‘transfer from’ and isolate the data I need to check.

Now I need to add a column identifying the first character in the string. Producing the results below.

Advertisement

Answer

Using LEFT and ISNUMERIC(), however be aware that ISNUMERIC thinks some additional characters such as . are numeric

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement