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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-07-02 : 16:23:16
|
Jerald writes "Hi SQL team... My Q to you is as described below...I have a table with some records in it (say about 100).. I have to write a Select query to fetch some no. of records from the table (say 10) with no field such as serial no.. etc.. in it..I have to get the serial numbers as 1,2,3,4.... so on (which will be generated dynamically in the query itself) for the 10 records that I have fetched with the data as well.. I have tried to get help from Books Online but did not find anything in it as yet.. or maybe in that case I did not search it properly..First of all can I do such a thing without using any stored procedure, just simple select query.. I will be glad if I can get a soln. to this problem..for an Example the data in the table would like thiscol1 col2----- ----JER JERRY FERNANDESCAL CALISTER CARVALOSAN SANDRA DEMELLOand so on...The result set should be like thisSr No. col1 col2----- ----- -------1 JER JERRY FERNANDES2 CAL CALISTER CARVALO3 SAN SANDRA DEMELLO and so on...I am using SQL Server 7 on Windows 2000 ServerThanking You All there..Regards...Jerald" |
|
|
|
|
|