Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
webcakali
Starting Member
16 Posts |
Posted - 2011-02-17 : 19:38:21
|
I would like to add a sequence number myquerymyquery as followsSelect fldKullAdi,fldPuan From tblUyeler Order By Convert(Decimal(25,2),fldPuan) DESC here, "Sira" cell including how I myquerySelect fldKullAdi,fldPuan From tblUyeler Where fldKullAdi = 'Mehmet'When I run the query and then display the output of the above would be as follows **************************************Select fldKullAdi,fldPuan,ROW_NUMBER() OVER(Order By Convert(Decimal(25,2),fldPuan) DESC) As Sira From tblUyeler I get the order number in this way.but when I took a single record is coming as well as the number 1.Thank you for helping |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-02-17 : 19:52:33
|
[code]; with tblas( select fldKullAdi,fldPuan, seq = row_number() over (order by fldPuan) from tblUyeler )select *from tblwhere fldKullAdi = 'Mehmet'[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
webcakali
Starting Member
16 Posts |
Posted - 2011-02-17 : 19:54:28
|
| Thank you very much for your help khtan... |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2011-02-18 : 00:04:40
|
quote: Originally posted by webcakali Thank you very much for your help khtan...
Wow..You do really have a wonderful website... http://www.mehmetsalkim.com/PBUH |
 |
|
|
|
|
|
|
|