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 |
|
simakas
Starting Member
3 Posts |
Posted - 2005-04-08 : 07:38:43
|
| hi,what should i insert into querie, to get a column with unique result row numberi have managed smth like this:--------------------------DROP TABLE top7gamesSELECT distinct top 7 data, pavadinimas, identity(smallint,1,1) as game_noINTO top7games FROM turnyrasORDER BY data DESCSELECT * FROM top7games--------------------------the result in column game_no isnt what i expected...________________simakas |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-04-08 : 08:19:38
|
and what do you expect? and what did you get?Go with the flow & have fun! Else fight the flow |
 |
|
|
simakas
Starting Member
3 Posts |
Posted - 2005-04-08 : 08:28:40
|
| solved that problem with three different queries:____________________________drop table top7gamesselect distinct top 7 data, pavadinimasinto top7games from turnyrasorder by data descALTER table top7games add game_no smallint identityselect * from top7games____________________________result: (in lithuanian :) )data pavadinimas game_no5.11.2003 Lietuvos pirmenyb#279;s 13.16.2002 Lietuvos žiemos pirmenyb#279;s 28.20.2001 Palangos Juz#279; 36.15.2001 Vilniaus pirmenyb#279;s 45.12.2001 Atviros Vilniaus pirmenyb#279;s 5________________simakas |
 |
|
|
|
|
|