Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9260277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:51:05+00:00 2026-06-18T12:51:05+00:00

I am using Sql Serevr 2008 How can I count the number of digits

  • 0

I am using Sql Serevr 2008

How can I count the number of digits in a database field , something along these lines:

select headline,
       REGEXP_count(name,'\d') as num_count
from accountTbl
where num_count > 3;

I am trying to detect if somebody has written more then 3 numeric digits in their headline text.

For example I want to catch:

'hello call me on 3 4 5 6 7 8' - match

'this is my number 234875' - match

'4 hello 4 and 66' - match

'leaving on the 24th going to be there at 6:30' - match
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:51:06+00:00Added an answer on June 18, 2026 at 12:51 pm

    SQL Server 2008 does not support regular expressions; only patterns are supported. You can use a query like this to find matches of three digits or more:

    select headline
    from accountTbl
    where patindex('%[0-9]%[0-9]%[0-9]%', headline) > 0
    

    You wouldn’t get the count, but you would be able to filter. The downside to this solution is that in order to search for, say, five digits you would need to change the pattern itself.

    Here is a quick demo on sqlfiddle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i sync sql server 2008-R2 (remopte server and local) using Microsoft Sync
Using SQL Server 2008 R2 we are looking for a way to select the
Ok I'm using SQL Server 2008 and have a table field of type VARCHAR(MAX)
I'm using SQL Server 2008 R2 and I can't seem to be able to
Can I connect to SQL Server 2008 using PDO and integrated security using the
I am using SQL server 2008 R2. I know I can use CONVERT with
I'm using SQL Server 2008 . How can I pass Table Valued parameter to
Hi i am using SQL SERVER 2008 R2, can someone please help me to
I am using SQL Server 2008 in a Visual Basic 2010 application. I can
I am using sql server 2008 and my column is nvarchar(max). How can I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.