SaMay Posted June 12, 2009 Report Share Posted June 12, 2009 (edited) Tabula id, cipars ieraksti 1| 9998 2| 104 3| 10 4| 54 Tā tad pieprasījums ir šāds SELECT * FROM kkas ORDER BY cipars DESC LIMIT 10 Skaitļi tiek sakārtoti ņemot vērā pirmo ciparu. Vajadzīgais rezultāts ir pēc skaitļu lieluma. Kā to var panākt? Edited June 12, 2009 by SaMay Quote Link to comment Share on other sites More sharing options...
marcis Posted June 12, 2009 Report Share Posted June 12, 2009 Glabāt skaitļus kā skaitliskas vērtības. Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted June 12, 2009 Report Share Posted June 12, 2009 (edited) SaMay --> kur iisti jautajums ??? ORDER BY jau arii karto .. kur problema??? ir ne tikai DESC bet arii ASC EDIT : marcis --> tam nav noziimes :) Edited June 12, 2009 by Grey_Wolf Quote Link to comment Share on other sites More sharing options...
bubu Posted June 12, 2009 Report Share Posted June 12, 2009 Gray_Wolf: ir gan. Ja tu skaitļus glabāsi CHAR(N), tad 19 būs mazāks pa 9. Quote Link to comment Share on other sites More sharing options...
SaMay Posted June 14, 2009 Author Report Share Posted June 14, 2009 Paldies. Nostrādāja. ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.