Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index was not longer optimized
Message
De
06/04/2010 14:07:21
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01458951
Message ID:
01458993
Vues:
38
>>>Your order by here is strange. I would probably re-write the whole query as
>>>
>>>select * from (select T.Numero, T.Title, T.Url, T.AddDate, row_number() 
>>>over (partition by R.NoThread order by R.NoThread) as Row from Thread T LEFT JOIN Reply R on T.NoThread = R.NoThread) X 
>>>where Row <=10
>>
>>I do not understand why it would be strange. The 10 records I need to select from Reply are subject to a specific order. To me, this is the clean way to do it.
>
>What does ORDER BY 1 DESC mean?

VFP order by the first field in descending order. Even then that is not really used (or better not used I think). I see it sometimes though. Perhaps he had VFP on his mind??? :o)
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform