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 |
|
RoyalSher
Yak Posting Veteran
95 Posts |
Posted - 2006-02-09 : 08:36:37
|
| Hi,I have a function GenRows() which generates row nums, and I have a table with 1000 rows, Tab A.Syntax: Select RowNum from GenRows(1000) - Generates row numsSyntax: Select c1, c2, c3 from Tab AHere I need to attach each row num against each row in the final resultset.Unfortunately, the function I am using is a Table Inline view, which returns table with row num values and I don't have any matching column between GenRows (which wouldn't obviously being a function). I just need a resultset looking likeRowNum C1 C2 C31 A B C2 C A B3 B C ACan somebody help me on how to resolve this, so that I can have peaceful weekend :(. Thanks in advance!RoyalSher.*********The world is the great gymnasium where we come to make ourselves strong. |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-02-09 : 08:47:41
|
| this is that article Returning a Row Number in a Query----------------------------------'KH'everything that has a beginning has an end |
 |
|
|
|
|
|