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 9134901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:44:51+00:00 2026-06-17T08:44:51+00:00

Consider a table category in a database, with column typeis. The datatype is varchar

  • 0

Consider a table category in a database, with column typeis. The datatype is varchar with values

         typeis
         ------
         2.5.1
         12
         1.1.1
         11
         letters12
         .........

I want to write a query that only returns records with “.” and numbers from 0-9

For example

         2.5.1
         1.1.1

So far, I have

       select typeis from category where typeis
       not in 
       (select typeis from category where typeis REGEXP  '[^0-9 \.]+')
       and typeis in
       (select typeis from category where typeis REGEXP  '^[0-9]+[\.]')

which seems to work. The problem is that it takes over 3secs for just 1500 records. I would like to make it simpler and faster with just one REGEXP, instead of having nested select

  • 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-17T08:44:52+00:00Added an answer on June 17, 2026 at 8:44 am

    Try: ^[0-9]+\.[0-9]+(\.[0-9]+)*

    This should match things starting with a number(s) including a dot somewhere in the middle, and ending with numbers, and as many of these patterns as it would like.

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

Sidebar

Related Questions

Consider following table. I'm trying to write a query to display - Max values
Consider a table products which has product details including its category. One product may
For my question lets consider the following sample table data: ProductID    ProductName    Price   Category 1                Apple                 5.00       Fruits
Consider my table with ten rows and I want to show first three rows
Consider an entity, Entry, that contains a collection of another entity (many-to-many), Category, such
consider table sales (id, seller_id, amount, date) and here is a view that is
Consider a table with 3 columns: ID (unique, taken from an Oracle sequence), CATEGORY
Consider: SELECT * FROM `product` left join category on product.category_id = category.id This query
Consider a table like this: folders_table ----------------------- INT id_folder INT id_folder_parent VARCHAR folder_name Which
Consider a table with a bit column indicating whether the object is active or

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.