Jumat, 28 Oktober 2011

RE: [belajar-access] Kolom menjadi baris

 

Table1

ID

IDW

Currency

Periode

1

Incoming

1000

For The Day

2

Delivery

500

For The Day

3

Wastage

100

For The Day

4

Incoming

2000

For the week

5

Delivery

1000

For the week

6

Wastage

50

For the week

1.       Buat table1 :

Table1_Crosstab

Periode

Total Of Currency

Incoming

Delivery

Wastage

For The Day

1600

1000

500

100

For the week

3050

2000

1000

50

2.       Buat query_crosstab

TRANSFORM Sum(Table1.Currency) AS SumOfCurrency

SELECT Table1.Periode, Sum(Table1.Currency) AS [Total Of Currency]

FROM Table1

GROUP BY Table1.Periode

PIVOT Table1.IDW;

 

Table1_Crosstab_Column_to_Baris

IDW

Total Of Currency

For The Day

For the week

Delivery

1500

500

1000

Incoming

3000

1000

2000

Wastage

150

100

50

 

3.       Buat query_crosstab_Column_to_Baris

TRANSFORM Sum(Table1.Currency) AS SumOfCurrency

SELECT Table1.IDW, Sum(Table1.Currency) AS [Total Of Currency]

FROM Table1

GROUP BY Table1.IDW

PIVOT Table1.Periode;

4.       Reportnya sbb:

 

---

Best Regards,

AccessWizards

 

From: belajar-access@yahoogroups.com [mailto:belajar-access@yahoogroups.com] On Behalf Of Cecep W
Sent: Friday, October 28, 2011 9:23 AM
To: belajar-access@yahoogroups.com
Subject: [belajar-access] Kolom menjadi baris

 

 

Hallo Suhu Access Semua...

langsung saja pada permasalahan yg ingin saya tanyakan, bagaimana
caranya mengubah kolom menjadi baris. Contoh:

Period Incoming Delivery Wastage
For the day 1000 500 100
For the week 2000 1000 50

saya inginkan adalah :

Periode For the day For the week
Incoming 1000 2000
Delivery 500 1000
Wastage 100 50

Datanya saya ambil dari Query yg akan saya tampilkan di Report

sebelumnya saya ucapkan terimakasih bagi yg berkenan membantu

Regards
CW

__._,_.___
Recent Activity:
SPAM IS PROHIBITED
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar