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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:20:41+00:00 2026-06-03T17:20:41+00:00

I have the following oracle query which runs fine SELECT c.customercode, s.sales_id FROM customers

  • 0

I have the following oracle query which runs fine

SELECT c.customercode, s.sales_id 
FROM customers c 
LEFT JOIN sales s ON c.customercode = s.sales_id
WHERE c.address IS NOT NULL

and it returns results looking something like this:

customercode        sales_id
12345678            456
34534534            678
23423423            X123

What I would like to do is exclude rows where the sales_id contains anything other than numeric characters. So the above results would not include the 3rd row.

  • 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-03T17:20:42+00:00Added an answer on June 3, 2026 at 5:20 pm

    You can use regular expressions. In this case, regexp_like( sales_id, '^[[:digit:]]*$' )

    SQL> with x as (select 12345678 code, '456' sales_id from dual union all
      2             select 34534534, '678' from dual union all
      3             select 23423423, 'X123' from dual)
      4  select *
      5    from x
      6   where regexp_like( sales_id, '^[[:digit:]]*$' );
    
          CODE SALE
    ---------- ----
      12345678 456
      34534534 678
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Oracle 10.2 and have the following query: select h.company, count(*) from history
I have the following query: SELECT wm_concat(DISTINCT NAME) as Methods FROM TPM_TRAININGPLAN JOIN TPM_DELIVERYMETHODS
I have the following query which runs perfectly well on both Oracle and SQL
I have a following oracle query: SELECT a.USER_ID, c.first_name, c.last_name, TO_CHAR( b.logon_date, 'MM/DD/YYYY HH:MI:SS
I have the following query that runs in my Oracle database and I want
I have the following Oracle query: SELECT id, DECODE(state, 'Open', state_in, NULL) AS open_in,
I have a simple query: select * from countries with the following results: country_name
I have the following HQL query which works fine, however it returns a list
I have the following query which obtains transactions from the transactions table and transaction
We have written the following query which returns records in Oracle but when the

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.