-
Hi
I get many rows of info from a table using a SQL Select statement,I just want to put a row number by the side of each resulting row, like:
1 jim
2 john
3 joe
4 james
5 ...
sounds simple, but... How?
Also any comments on how to print row numbers in DataReport would be nice.
Thanks
-
-
Hi again
The user wants me to print it!
-
The problem is, it's meaningless unless the data (row number) is stored.
-
If your record set is ordered by something for example name. Then it could look like this
Code:
SELECT
Name,
( SELECT
COUNT( * )
FROM
tblName N2
WHERE
N2.Name <= N1.Name
)
FROM
tblName N1
ORDER BY
Name
GROUP BY
Name
Might not be the best but it at least pops your thread to the top.
-
Hi
After Hitting my head on the wall for so many times, I have found that I could add a column to my recordset using Shape ... Append command with the NEW option, and then fill it with row numbers in a loop.
Thanks