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 |
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2005-07-09 : 09:19:14
|
Hello Everybody,Is there any way i can get the numbers in the squence order in the query. Somthing Extactly like Identity. Where i can specify the number the starting number and number to be incremented. I can use Indentity but, i have to use Temperory tables with it, which i dont want to use.... since it affects the performance... is there any other way i can do the same!!!And also non of the Column in that table is Unique... Thanks in AdvanceComplicated things can be done by simple thinking |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2005-07-09 : 17:23:39
|
| In a query ? |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2005-07-10 : 02:28:33
|
| Yes in a Query.. or if u have any solution then do let me know that.. i will try to implement the same if its possible.. but it can be better if this can be done in a query..Complicated things can be done by simple thinking |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-11 : 01:43:04
|
Something like thisSelect (select count(*) from yourTable where primarycol<=T.primarycol) as Sno,<othercols> from yourTable T MadhivananFailing to plan is Planning to fail |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2005-07-11 : 03:42:28
|
i got this query from net, but the problem with this query is the primary col should be there, in my table there is not primary column... so this is the problem... anyways thanks a lot... Complicated things can be done by simple thinking |
 |
|
|
|
|
|