Query numbering in groups in access database ?
-
in sql server there is a group problem statement: DENSE_RANK() OVER (ORDER BY TABLUONGNV3.HOVATEN) AS STT How to write in sql access issues in groups? I'm not writing well: (Select Count (*) FROM [TABLUONGNV3] as Temp WHERE [Temp].[MANHANVIEN] < [TABLUONGNV3].[MANHANVIEN]) + 1 AS STT
SELECT (Select Count (*) FROM [TABLUONGNV3] as Temp WHERE [Temp].[MANHANVIEN] < [TABLUONGNV3].[MANHANVIEN]) + 1 AS STT, TABLUONGNV3.HOVATEN, TABNHANVIEN.IDNV, TABLUONGNV3.MACANV, TABNHANVIENCA.CANV, TABLUONGNV3.N01, TABLUONGNV3.N02, TABLUONGNV3.N03, TABLUONGNV3.N04, TABLUONGNV3.N05, TABLUONGNV3.N06, TABLUONGNV3.N07, TABLUONGNV3.N08, TABLUONGNV3.N09, TABLUONGNV3.N10, TABLUONGNV3.N11, TABLUONGNV3.N12, TABLUONGNV3.N13, TABLUONGNV3.N14, TABLUONGNV3.N15, TABLUONGNV3.N16, TABLUONGNV3.N17, TABLUONGNV3.N18, TABLUONGNV3.N19, TABLUONGNV3.N20, TABLUONGNV3.N21, TABLUONGNV3.N22, TABLUONGNV3.N23, TABLUONGNV3.N24, TABLUONGNV3.N25, TABLUONGNV3.N26, TABLUONGNV3.N27, TABLUONGNV3.N28, TABLUONGNV3.N29, TABLUONGNV3.N30, TABLUONGNV3.N31, TABNHANVIENCA.TIENMOTCA, TABLUONGNV3.TONGLUONG, TABLUONGNV3.PHAT, TABLUONGNV3.TAMUNG, TABLUONGNV3.THUCNHAN, TABLUONGNV3.GHICHU
FROM TABNHANVIENCA INNER JOIN (TABNHANVIEN INNER JOIN TABLUONGNV3 ON TABNHANVIEN.IDNV = TABLUONGNV3.MANHANVIEN) ON TABNHANVIENCA.IDCANV = TABLUONGNV3.MACANV
WHERE TABLUONGNV3.LUONGTHANG = #06/01/2019#
ORDER BY TABLUONGNV3.HOVATEN;You see the attached file: http://www.mediafire.com/file/pajlr19fwde8r9l/Query\_numbering.xls/file
-
in sql server there is a group problem statement: DENSE_RANK() OVER (ORDER BY TABLUONGNV3.HOVATEN) AS STT How to write in sql access issues in groups? I'm not writing well: (Select Count (*) FROM [TABLUONGNV3] as Temp WHERE [Temp].[MANHANVIEN] < [TABLUONGNV3].[MANHANVIEN]) + 1 AS STT
SELECT (Select Count (*) FROM [TABLUONGNV3] as Temp WHERE [Temp].[MANHANVIEN] < [TABLUONGNV3].[MANHANVIEN]) + 1 AS STT, TABLUONGNV3.HOVATEN, TABNHANVIEN.IDNV, TABLUONGNV3.MACANV, TABNHANVIENCA.CANV, TABLUONGNV3.N01, TABLUONGNV3.N02, TABLUONGNV3.N03, TABLUONGNV3.N04, TABLUONGNV3.N05, TABLUONGNV3.N06, TABLUONGNV3.N07, TABLUONGNV3.N08, TABLUONGNV3.N09, TABLUONGNV3.N10, TABLUONGNV3.N11, TABLUONGNV3.N12, TABLUONGNV3.N13, TABLUONGNV3.N14, TABLUONGNV3.N15, TABLUONGNV3.N16, TABLUONGNV3.N17, TABLUONGNV3.N18, TABLUONGNV3.N19, TABLUONGNV3.N20, TABLUONGNV3.N21, TABLUONGNV3.N22, TABLUONGNV3.N23, TABLUONGNV3.N24, TABLUONGNV3.N25, TABLUONGNV3.N26, TABLUONGNV3.N27, TABLUONGNV3.N28, TABLUONGNV3.N29, TABLUONGNV3.N30, TABLUONGNV3.N31, TABNHANVIENCA.TIENMOTCA, TABLUONGNV3.TONGLUONG, TABLUONGNV3.PHAT, TABLUONGNV3.TAMUNG, TABLUONGNV3.THUCNHAN, TABLUONGNV3.GHICHU
FROM TABNHANVIENCA INNER JOIN (TABNHANVIEN INNER JOIN TABLUONGNV3 ON TABNHANVIEN.IDNV = TABLUONGNV3.MANHANVIEN) ON TABNHANVIENCA.IDCANV = TABLUONGNV3.MACANV
WHERE TABLUONGNV3.LUONGTHANG = #06/01/2019#
ORDER BY TABLUONGNV3.HOVATEN;You see the attached file: http://www.mediafire.com/file/pajlr19fwde8r9l/Query\_numbering.xls/file
As you are not explaining this very well try the following: 1. Simplify your query down to the bare bones to demonstrate your problem e.g. remove all but one of the columns from TABLUONGNV3 from the select. 2. Supply us with some sample data for each of the tables left in your simplified query 3. Provide the results that you expect from the sample data provided. Don't link to files - we won't download them, besides mediafire is a blocked site on my work computer.
-
As you are not explaining this very well try the following: 1. Simplify your query down to the bare bones to demonstrate your problem e.g. remove all but one of the columns from TABLUONGNV3 from the select. 2. Supply us with some sample data for each of the tables left in your simplified query 3. Provide the results that you expect from the sample data provided. Don't link to files - we won't download them, besides mediafire is a blocked site on my work computer.
This site has no support for sending attachments, so I use mediafire to send attachments, if your computer is blocked you can bypass the firewall using psiphon3.exe software, you can download this software at address [Download Psiphon 3 for PC Windows 7/8/8.1/10 or XP Laptops](https://brighterhq.com/download-psiphon-for-pc-laptop-windows#Psiphon\_3\_Download) Soon receive your feedback
-
This site has no support for sending attachments, so I use mediafire to send attachments, if your computer is blocked you can bypass the firewall using psiphon3.exe software, you can download this software at address [Download Psiphon 3 for PC Windows 7/8/8.1/10 or XP Laptops](https://brighterhq.com/download-psiphon-for-pc-laptop-windows#Psiphon\_3\_Download) Soon receive your feedback