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

  • Home
  • SEARCH
  • 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 279727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:03:25+00:00 2026-05-12T05:03:25+00:00

I have a column called check_num (bank check number) as VARCHAR2 type in a

  • 0

I have a column called check_num (bank check number) as VARCHAR2 type in a payment_line table(Oracle).

The requirement is “I have to search all those checks which numbers are greater than 12345.

Please suggest how can I achieve this?

  • 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-05-12T05:03:26+00:00Added an answer on May 12, 2026 at 5:03 am

    There most likely is a more elegant solution, but this should do the trick:

    SELECT * 
    FROM payment_line pl 
    WHERE LENGTH(TRIM(TRANSLATE(pl.check_num, '0123456789',' '))) IS NULL 
       AND TRIM(TRANSLATE(pl.check_num, '0123456789','0123456789')) > 12345;
    

    edit:

    If I understand your comment to Adam Paynter, for input of:

    0A132 
    1A117 
    2A123 
    12D24 
    02134 
    11111 
    12345 
    21334 
    

    and you used 1A117 as your comparison the resulting set would be:

    2A123 
    12D24 
    02134 
    11111 
    12345 
    21334
    

    Can you confirm that both 02134 and 11111 should be in this result set? They dont seem to meet the requirements of > a value like 1A117. If, however, that was a typo, you can actually run a simple string comparison to get this set:

    SELECT * 
    FROM payment_line pl
    WHERE pl.check_num > '1A117';
    

    edit 2

    OK, I think I see where you are going with this. You are looking to get the rows in the db that have been entered after the input row. If you look at my formatted list above, you will see that your result set is everything below your input string. So, with that in mind, i submit for your approval the following:

    SELECT * 
    FROM payment_line  
    WHERE rowid > (select rowid from payment_line where check_num ='1A117');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In database table I have column called options . It has type of integer
I have a column in a MySQL table called year. I want to check
I have a table called scheduled_sessions and a Boolean column called instructor_performed to check
Assuming I have a column called A and I want to check if A
Suppose I have a column called fruits I want to select all of the
In mysql database i have this column called: Name: Date Type: datetime I have
So here is the situation. In my db table i have a column called
I have a table called Address which has a not-null CityID column and a
I have an XML data type column called tags. In that, I am storing
I have a table called profiles. There was a column in this table called

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.