Database Programming/Counter in report

Advertisement


Question
Hello,
I am creating reports based on multiple criteria.
Each time I need to print a report I want to add a column as a counter (1-2-3-4-5-6-...) before each record.
How can I solve this inquiry ?

Thank you and regards.
Maya

Answer
It depends on the report writing system and database used.  Some reporting systems have a row number column that can easily be added.  If using Oracle as the database, the query could use a sequence to generate the row number. SQL Server and MySQL have autonumber columns.

Database Programming

All Answers


Answers by Expert:


Ask Experts

Volunteer


Carl Lim

Expertise

I can can answer questions about: - Oracle - SQL Server - MySQL - database design for OLTP and OLAP - logical models and physical data models - ERwin - SQL

Experience

I currently work on database design on a day to day basis. I have years of experience with Oracle, SQL Server, MySQL, and database design tools.

Organizations
DAMA

Education/Credentials
BS Computer Engineering
Multiple Data Warehouse Class Completion Certificates

Hobbies
Playing games at http://www.GameGremlin.com

©2016 About.com. All rights reserved.