我正在Microsoft Access中创建一个将用于资源规划的应用程序。
我的SQL表的结构大致如下:
ID DATE SHIFT PERSON
我正在为从表中检索数据而苦苦挣扎,我可以用这种方式填充规划表单。
我在找这样的东西:
NAME 16/11 17/11 18/11 19/11 20/11 21/11 22/11
Person 1 Day Day Day Day Day
Person 2 Night Night Night Night Night
Person 3 Day Day Day Day Day
但是,我还没有找到能得到这个结果的SQL查询。
有什么想法吗?
发布于 2015-11-18 02:04:43
将所有数据输入MS Access。按如下方式使用交叉表查询向导:
1) Select Your table <next>
2) For Row headings select "Person" <next>
3) For Column headings choose "Shift_Date" (since date is a reserved
word used column name of Shift_date) <next>
4) By which interval? select "Date" <next>
5) For: What number do you want calculated for each column and row
intersection? choose "Shift", and for function choose "Max"
6) Finish
https://stackoverflow.com/questions/33759137
复制相似问题