Untuk mas yusuf, saya punya contoh sqlnya
nihhh
SELECT DISTINCT KODE,
SUM(CASE month(TANGGAL)
WHEN 1 THEN JUMLAH ELSE 0 END) AS bln1,
SUM(CASE month(TANGGAL)
WHEN 2 THEN JUMLAH ELSE 0 END) AS bln2,
SUM(CASE month(TANGGAL)
WHEN 3 THEN JUMLAH ELSE 0 END) AS bln3,
SUM(cASE month(TANGGAL)
WHEN 4 THEN JUMLAH ELSE 0 END) AS bln4,
SUM(CASE month(TANGGAL)
WHEN 5 THEN JUMLAH ELSE 0 END) AS bln5,
SUM(CASE month(TANGGAL)
WHEN 6 THEN JUMLAH ELSE 0 END) AS bln6,
SUM(CASE month(TANGGAL)
WHEN 7 THEN JUMLAH ELSE 0 END) AS bln7,
SUM(cASE month(TANGGAL)
WHEN 8 THEN JUMLAH ELSE 0 END) AS bln8,
SUM(CASE month(TANGGAL)
WHEN 9 THEN JUMLAH ELSE 0 END) AS bln9,
SUM(CASE month(TANGGAL)
WHEN 10 THEN JUMLAH ELSE 0 END) AS bln10,
SUM(CASE month(TANGGAL)
WHEN 11 THEN JUMLAH ELSE 0 END) AS bln11,
SUM(CASE month(TANGGAL)
WHEN 12 THEN JUMLAH ELSE 0 END) AS bln12
FROM TRANS04
where DARI like 'TOKO%' and TARGET like
'PBELI%' and KODE like '01%'
GROUP BY KODE
order by KODE
semoga membantu
From: yusup andrias
[mailto:[EMAIL PROTECTED]
Sent: 02 April 2005 11:04
To: [EMAIL PROTECTED]
Subject: Re: [Programmer-VB] tanya
report header
mas doly, yang mau sy tanyakan, gimana cara buat querynya spy bisa
tampil spt ini??
no_anggota
januari
februari ---
desember
jumlah
001
x
x
x
1000000
thx ya
[EMAIL PROTECTED]
wrote:
Anda pake CrossTab dan itu ada di Crystal Report
dan Access via
Querynya....
yusup
andrias
<yorkie_3mp3r4d0r
@yahoo.com>
To
[EMAIL PROTECTED]
04/01/05 04:01
PM
cc
Subject
Please respond to
[Programmer-VB] tanya report header
[EMAIL PROTECTED]
oogroups.com
dear all,
i mau tanya neh, maybe ada yang udah pernah bahas
saya punya data
no_anggota
bulan jumlah
0001
januari 1000000
0001
february 1000000
:
:
0001
desember 1000000
nah yang mau saya tanyakan
bisa ga kalo waktu di report jadi
no_anggota
januari
februari ---
desember
jumlah
001
x
x
x
1000000
mohon pencerahannya ya...thx
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
Untuk keluar dari millis ini, kirim email kosong
ke:
[EMAIL PROTECTED]
Yahoo! Groups Links
To visit your group
on the web, go to:
http://groups.yahoo.com/group/programmer-vb/
To unsubscribe from
this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo!
Groups is subject to the Yahoo! Terms of Service.
**********************************************************************
This e-mail and any files transmitted with it may
contain
confidential information and is intended solely
for use by
the individual to whom it is addressed. If
you received
this e-mail in error, please notify the sender, do
not
disclose its contents to others and delete it from
your
system.
**********************************************************************
Untuk keluar
dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Untuk
keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]
Untuk keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]
Yahoo! Groups Links