In DB2 I have the requirement of sorting only numeric values from varchar data type column by using some range criteria.
The database table contains numeric as well as alphanumeric values. For ex. `1?, `2?, `6?, `13?, `34? ,?ABC123?, `POE?, `12IUY?, `FG23RF? etc.
Using range search of 1 to 20, result should give `1?, `2?, `6?, `13? values only. I tried using between, < and > operators but it does not give correct results.
Here I don't want to use IN clause.
Any help on building such is highly appreciated.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:firstname.lastname@example.org
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: