使用MS Access 2007将行转换为另一个表中的列

时间:2012-09-26 13:27:35

标签: ms-access-2007

我需要将行转换为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的单独表中。

0 个答案:

没有答案