Good afternoon! Here I fulfill request:
SELECT `DocNom`,`DocDate`, `DocName`, SUBSTRING_INDEX(`DocFile`, ':', -1) AS `FileSizeSort` FROM `Message2002` ORDER BY `FileSizeSort` DESC The query displays the drain and sorted naturally as a string. I would like to bring it to a number and sort it as a number. This fragment does not work as it should:
SELECT `DocNom`,`DocDate`, `DocName`, SUBSTRING_INDEX(`DocFile`+0, ':', -1) AS `FileSizeSort` FROM `Message2002` ORDER BY `FileSizeSort` DESC What could be the problem? Thank!
DocNom,DocDate,DocName, SUBSTRING_INDEX (DocFile, ':', -1) ASFileSizeSortFROMMessage2002