![]() |
Add add number
I have a group query:
SELECT Course.course_code, Course.course_name, Count (Course.ID) AS CountOfID FROM Course GROUP BY Course.course_code, Course.course_name; Is there any way I can add a numbering field (using the build wizard or any way)to give numbering to records. Please advise. |
Add add number
you already have a numbering field...
Course.ID change you SQL to SELECT Course.ID, course_code, course_name, _ Count(Course.ID) AS CountOfID FROM Course GROUP BY course_code, course_name; Patrick Molloy Microsoft Excel MVP -----Original Message----- I have a group query: SELECT Course.course_code, Course.course_name, Count (Course.ID) AS CountOfID FROM Course GROUP BY Course.course_code, Course.course_name; Is there any way I can add a numbering field (using the build wizard or any way)to give numbering to records. Please advise. . |
Add add number
If Course.ID isn't satisfactory as a numbering field, you could try
something like this: SELECT C1.course_code, C1.course_name, ( SELECT count(*) FROM Course C2 WHERE C2.Course_code <= C1.Course_code ) as Counting FROM Course C1 ; -- HTH, Dianne In , JA typed: I have a group query: SELECT Course.course_code, Course.course_name, Count (Course.ID) AS CountOfID FROM Course GROUP BY Course.course_code, Course.course_name; Is there any way I can add a numbering field (using the build wizard or any way)to give numbering to records. Please advise. |
Add add number
Who said Course.ID is a number? But I admit it's a good bet. Someone
who would take a non-procedural, set-orientated language like SQL and use it to create cursor is more than likely to choose a IDENTITY column as a primary key, right? -- "Patrick Molloy" wrote in message ... you already have a numbering field... Course.ID change you SQL to SELECT Course.ID, course_code, course_name, _ Count(Course.ID) AS CountOfID FROM Course GROUP BY course_code, course_name; Patrick Molloy Microsoft Excel MVP -----Original Message----- I have a group query: SELECT Course.course_code, Course.course_name, Count (Course.ID) AS CountOfID FROM Course GROUP BY Course.course_code, Course.course_name; Is there any way I can add a numbering field (using the build wizard or any way)to give numbering to records. Please advise. . |
All times are GMT +1. The time now is 05:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com