แสดงกระทู้

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mongkong

หน้า: [1]
1
ห้อง MS Access / : CrossTab Query Sort
« เมื่อ: 14 ก.ย. 61 , 20:18:30 »
TRANSFORM First(register.grade) AS FIRSTofgrade
SELECT student.id, student.name, student.room, student.num
FROM subject INNER JOIN (student INNER JOIN register ON student.id = register.id) ON subject.code = register.code
GROUP BY student.id, student.name, student.room, student.num
ORDER BY student.room, student.num, [type] & "-" & [register].
โค๊ด: [Select]
[/color]
PIVOT [type] & "-" & [register].[code];
 :ouch: :ouch: :ouch:
โพสต์นี้ได้รับคำขอบคุณจาก: mongkong

2
ห้อง MS Access / : CrossTab Query Sort
« เมื่อ: 14 ก.ย. 61 , 15:41:35 »


ไม่รู้ว่าเข้าใจถูกป่าวนะครับ แล้วก็ไม่รู้มีวิธีอื่นที่ดีกว่านี้รึป่าว
จากรูป ให้เอา Row Heading ที่ต้องการ เอามาเรียงเองเลย
จากรูป ผมเรียงจากเดือน 10 ไปเรื่อยๆ แต่ถ้า Row Heading
ของคุณเป็น Text ให้ใส่ Duble Qote ด้วย เช่น "ตุลาคม","พฤศจิกายน","ธันวาคม"
ค่าที่นำมาใส่นี้ ต้องเป็นค่าที่ได้จากการคำนวนของฟิลด์ที่นำมาเป็น คอลัม
โพสต์นี้ได้รับคำขอบคุณจาก: mongkong

หน้า: [1]