SELECT * FROM(SELECT *, (ROW_NUMBER() OVER(ORDER BY [poff3].[dbo].[LU_workplace].[Codeworkplace] ASC)-1) / 20 AS page_num FROM [poff3].[dbo].[LU_workplace]) AS TABLE1 WHERE page_num = 0
ผมจะเพิ่ม
Code
[poff3].[dbo].[LU_workplace] INNER JOIN [poff3].[dbo].[LU_gr_wp] ON [poff3].[dbo].[LU_workplace].[gr_wp] = [poff3].[dbo].[LU_gr_wp].[codegr_wp]
ใส่ไว้ตรงไหนครับ ลองใส่ไว้่ตรง FROM แล้ว ก็ไปติดตรง AS TABLE1