Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Wildcard Query Against Numeric Column

570448Feb 28 2008 — edited Feb 28 2008
I'm on a 10gR2 DB. I'd like to form a query against a column of type NUMBER that contains 8 digit numbers that will return all rows that end in the digits 01.

To clarify further, if the underscore character worked as a wildcard on columns of datatype NUMBER I could do this:
SELECT num FROM test_table WHERE num=______01;
* Using a wildcard for the first 6 digits.

If possible I'd like to keep from having to convert the column to characters to accomplish my query. For example, I'm trying not to do:
SELECT num FROM test_table WHERE TO_CHAR(num)='______01';

Andy help is greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2008
Added on Feb 28 2008
8 comments
625 views