Sort Alpha Numeric data in SQL Server
Sorting a alphanumeric data, A sample data is as below

When i sort the data it looks like below

I have modified the ORDER BY clause as shown below, and it returned the results in the proper order.
(Note: The ID column is defined as varchar(20). So, I did the following to fix this issue:
If ID is numeric, add 21 '0's in front of the ID value and get the last 20 characters
If ID is not numeric, add 21 ‘’s at the end of the ID value and get the first 20 characters

When i sort the data it looks like below
I have modified the ORDER BY clause as shown below, and it returned the results in the proper order.
(Note: The ID column is defined as varchar(20). So, I did the following to fix this issue:
If ID is numeric, add 21 '0's in front of the ID value and get the last 20 characters
If ID is not numeric, add 21 ‘’s at the end of the ID value and get the first 20 characters
penturpers-ge Erika Walker https://marketplace.visualstudio.com/items?itemName=0perresluchi.Metal-Division-gratuita-2021
ReplyDeletetabubbtackthe
tidagiaki Emma Connolly https://laradicalteatro.wixsite.com/laradicalteatro/profile/Simatic-Manager-Step-7-V55-Free-Download-BETTER/profile
ReplyDeleteterpconziefron
probquien-so Corey Bouie download
ReplyDeleteoxprocmichi