0

我需要在 MS Access 2007 中将行转换为从表 A 到表 B 的列。

我们开始吧,下面是 Table01 中的数据,应该转置到另一个表中。

Customer_Name   Contacted_Date  Response_Code
Mr. Abc         01-Sep-12   Switched Off
Mr. Abc         02-Sep-12   Ringing
Mr. Abc         03-Sep-12   Call Back
Mr. Abc         04-Sep-12   Agreed
Mr. Def         01-Sep-12   Switched Off
Mr. Def         02-Sep-12   Ringing
Mr. Def         03-Sep-12   Call Back
Mr. Def         04-Sep-12   Agreed
Mrs. Ghi        01-Sep-12   Switched Off
Mrs. Ghi        02-Sep-12   Ringing
Mrs. Ghi        03-Sep-12   Call Back
Mrs. Ghi        04-Sep-12   Agreed
Mr. Jkl         01-Sep-12   Switched Off
Mr. Jkl         02-Sep-12   Ringing
Mr. Jkl         03-Sep-12   Call Back
Mr. Jkl         04-Sep-12   Agreed
Mr. Mno         01-Sep-12   Switched Off
Mr. Mno         02-Sep-12   Ringing
Mr. Mno         03-Sep-12   Call Back
Mr. Mno         04-Sep-12   Agreed
Mrs. Pqr        01-Sep-12   Switched Off
Mrs. Pqr        02-Sep-12   Ringing
Mrs. Pqr        03-Sep-12   Call Back
Mrs. Pqr        04-Sep-12   Agreed

这正是我需要的东西。

Customer_Name   01-Sep-12   02-Sep-12   03-Sep-12   04-Sep-12
Mr. Abc         Switched Off    Ringing         Call Back   Agreed
Mr. Def         Switched Off    Ringing         Call Back   Agreed
Mrs. Ghi        Switched Off    Ringing         Call Back   Agreed
Mr. Jkl         Switched Off    Ringing         Call Back   Agreed
Mr. Mno         Switched Off    Ringing         Call Back   Agreed
Mrs. Pq         Switched Off    Ringing         Call Back   Agreed

因此,数据被转置到名为 Table02 的单独表中。

4

0 回答 0