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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
There most likely is a more elegant solution, but this should do the trick:
edit:
If I understand your comment to Adam Paynter, for input of:
and you used
1A117as your comparison the resulting set would be:Can you confirm that both
02134and11111should be in this result set? They dont seem to meet the requirements of>a value like1A117. If, however, that was a typo, you can actually run a simple string comparison to get this set: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: