i have created a report in koha3 with the following sql:<br><div class="gmail_quote"><div class="gmail_quote"><div><div class="h5"><br>SELECT
items.barcode,items.dateaccessioned,items.price,items.itemcallnumber,items.holdingbranch,biblioitems.biblioitemnumber,biblioitems.isbn,biblioitems.publicationyear,biblioitems.pages,biblioitems.size,biblioitems.place,biblio.title,biblio.author,biblio.copyrightdate
FROM items LEFT JOIN biblioitems on
(items.biblioitemnumber=biblioitems.biblioitemnumber) LEFT JOIN biblio
on (biblioitems.biblionumber=biblio.biblionumber) ORDER BY
(items.barcode) asc<br><br>now items.barcode field has values in alpha numeric (some are starting from 1, 2, 3, 4, etc and some barcodes are with prefix like m23, m45, m46, m67, etc ) but in my report i got the output in strange sorting order like:<br>
<br>items.barcode<br>----------------------<br><br>1565678<br>89765<br>u123456711<br>u12345679<br>....<br>....<br><br>but i want to sort numbers first, then barcodes with prefix. Can someone guide me how to do so?<br><br clear="all">
a friend of mine suggested me to use CAST in sql but i don't know what is this and how to use it<br><font color="#888888">-- <br>Regards<br><br>Abdul Vali<br>Librarian - ASE School<br><br><br>
</font></div></div></div><br>
</div><br>