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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:15:24+00:00 2026-06-04T03:15:24+00:00

I apologize if this question was asked before I just couldn’t correctly formalize it.

  • 0

I apologize if this question was asked before I just couldn’t correctly formalize it. I have a code column in a table and want to query it but remove some elements with some particular code. Say I want to take elements with code starting from 4 but not include the elements with code whose 6-th number is 9 (1121290).

The code column contains string of numbers with max-length of 8 char. and I want to take almost everything that starts with 4 except elements that start with 411, 427 and 428

  • 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-04T03:15:26+00:00Added an answer on June 4, 2026 at 3:15 am

    Yes you can give query like this:–

    I have column element with 6 digit codes.

    I am fetching element whose 1st digit is 4 or 6th is 9.

    we have to use % and _ for fetching..

    SELECT element  FROM "table" WHERE element LIKE '%4____9%';
    

    try this it will work.

    Everything that starts with 4 except elements that start with 411, 427 and 428 :-

     SELECT element  FROM "table" WHERE element LIKE '%4__';
    

    1st digit is 4 and 6th is not 9: I tested this one it is working fine try this :-

    SELECT element  
    FROM "table" 
    WHERE element NOT LIKE '%_____9' and element LIKE '%4_____'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologize if this question was asked already before but I could not find
Apologies if this question has been asked before, I couldn't find anything similar. I
I apologize if this question has been asked before, but my case is a
First off, I apologize if this question has been asked before. I've done a
I've searched SO and have been unable to find this question asked before, but
I apologize if the same question was asked already. I just couldn't find. Please
Apologies if this question has been asked already, but suppose we have this code
First off, apologies if this question has been asked before but I couldn't find
Apologies if this is too ignorant a question or has been asked before. A
Hopefully no one has asked this question - didn't see it, but I apologize

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.