Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>>I've got this at the end of my SQL:
>>>>
>>>>ORDER BY metal, amount DESCENDING
>>>>
>>>>It puts it in order by metal, but not by amount. I have no idea why.
>>>>
>>>>Thanks,
>>>>
>>>>Michelle
>>>
>>>does the list look like
>>>
>>>"IRON", 10000
>>>"IRON", 9000
>>>"GOLD", 5000
>>>"GOLD", 3000
>>
>>No, actually. I just realized that the metal (D,G,N) is in order ascending. The amount seems to be in random order.
>>
>>Thanks,
>>
>>Michelle
>
>If you remove the word DESCENDING does that fix the problem? Can you list a sampling of what the order looks like?
I got it working, now. I think this thing is buggy.
metal, amount DESCENDING = metal asc, amount random
metal DESCENDING, amount DESCENDING = metal desc, amount random
1 DESCENDING, 3 DECENDING = Works
1 ASCENDING, 3 DECENDING = Error
1 ASC, 3 DESCENDING = Works
So, finally, I got it in the proper order.
Thanks,
Michelle
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement