-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 3 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 4 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
slamet_linuxOffline
Location:
Post subject: Query  PostPosted: 07/May/2008 13:05
onIntermediate


Joined: 15-Feb-2007
Posts: 50

Status: Offline
rekan rekan mau tanya :
klo misalnya ada table :
//Table Master

Nomor
Tanggal
Kode1

//Table Detail

Nomor
Kode2
Harga
Jumlah
Total


//////////////////////////////////////////////////////////////+
// Nomor :
// Tanggal :
// Kode1 :
//
//------------------------------------------------------------
// NOmor | Kode2 | Harga | Jumlah | Total
//------------------------------------------------------------
//
//
//
//
//
//------------------------------------------------------------
// Total
//
///////////////////////////////////////////////////////////////

statement sql nya gimana ya ? supaya hasilnya :

|==============================+
| Nomor | Tanggal | Total |
|==============================+
| xxxx | yyyyyy | zzzzzzz |
| xxxx | yyyyyy | zzzzzzz |
|==============================+

select a.Nomor, b.Tanggal, ....
from Table1 a, table2 b
where a.Nomor = b.Nomor
order by Nomor

tararengkyu
 
 View user's profile Send private message  
Reply with quote Back to top
ImanD
Location: BeDeGe
Post subject:   PostPosted: 07/May/2008 13:18
onElite


Joined: 09-Oct-2005
Posts: 1313
Location: BeDeGe
xixixi mo jawab apa ya, bingung ini pertanyaan dah ke jawab apa emang maksudnya gwe ga ngerti,

coba sample datanya skalian bro

_________________

website: http://darusmanaiman.net/
e-mail:
darusmanaiman@programmer.net
programmer@darusmanaiman.net
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
heruxOffline
Location: Kediri
Post subject:   PostPosted: 07/May/2008 13:42
onProfessional


Joined: 13-Jul-2006
Posts: 668
Location: Kediri
Status: Offline
kalo susah ya pake query tool khan banyak tuh !!
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
AlfandoOffline
Location:
Post subject:   PostPosted: 07/May/2008 13:51
onConfident


Joined: 28-Apr-2008
Posts: 28

Status: Offline
apa maksutnya mau nampilkan total nomer per tanggal?

select a.Nomor, b.Tanggal, count(a.Nomor)
from Table1 a, table2 b
where a.Nomor = b.Nomor
order by Nomor

sori kalau salah

_________________
SUGALI, tak seperti yang kau duga
 
 View user's profile Send private message  
Reply with quote Back to top
AlfandoOffline
Location:
Post subject:   PostPosted: 07/May/2008 13:55
onConfident


Joined: 28-Apr-2008
Posts: 28

Status: Offline
select a.Nomor, b.Tanggal, count(a.Nomor) Total
from Table1 a, table2 b
where a.Nomor = b.Nomor
order by Nomor

_________________
SUGALI, tak seperti yang kau duga
 
 View user's profile Send private message  
Reply with quote Back to top
slamet_linuxOffline
Location:
Post subject:   PostPosted: 07/May/2008 14:36
onIntermediate


Joined: 15-Feb-2007
Posts: 50

Status: Offline
      ImanD wrote:
xixixi mo jawab apa ya, bingung ini pertanyaan dah ke jawab apa emang maksudnya gwe ga ngerti,
coba sample datanya skalian bro


Sad(
itu yang .... (titik - titik) itu pa, kan itu :

select a.Nomor, b.Tanggal, ....
from Table1 a, table2 b
where a.Nomor = b.Nomor
order by Nomor

itu yang titik titik kan (sum(total) from Table2 where Nomor = :Nomor) biar jadi satu gimana ?
 
 View user's profile Send private message  
Reply with quote Back to top
Wong_JowoOffline
Location:
Post subject:   PostPosted: 07/May/2008 15:06
onConfident


Joined: 13-Nov-2007
Posts: 27

Status: Offline
mm... mas slamet mbingungi banget loh,,,

code : pascal
  1. select b.nomor,a.tanggal,sum(b.total)
  2. from table1 a, table2 b
  3. where a.nomor = b.nomor
  4. group by b.nomor
  5. order by b.nomor;
Parsed in 0.002 seconds, using GeSHi
 
 View user's profile Send private message  
Reply with quote Back to top
slamet_linuxOffline
Location:
Post subject:   PostPosted: 07/May/2008 16:17
onIntermediate


Joined: 15-Feb-2007
Posts: 50

Status: Offline
      Wong_Jowo wrote:
mm... mas slamet mbingungi banget loh,,,

code : pascal
  1. select b.nomor,a.tanggal,sum(b.total)
  2. from table1 a, table2 b
  3. where a.nomor = b.nomor
  4. group by b.nomor
  5. order by b.nomor;
Parsed in 0.002 seconds, using GeSHi


ok pa, satu pertanyaan lagi, klo misalnya yang di table detail itu field total nya tidak hanya satu misal total1, total2, total3, dst.... gimana query nya ya ?
code : pascal
  1. select b.nomor,a.tanggal,sum(b.total1, b.total2 )
  2. from table1 a, table2 b
  3. where a.nomor = b.nomor
  4. group by b.nomor
  5. order by b.nomor;
Parsed in 0.002 seconds, using GeSHi


kan ga bisa ?
 
 View user's profile Send private message  
Reply with quote Back to top
ImanD
Location: BeDeGe
Post subject:   PostPosted: 07/May/2008 16:25
onElite


Joined: 09-Oct-2005
Posts: 1313
Location: BeDeGe
[sql:1:bd44738c28]
select b.nomor, a.tanggal, sum(b.total1), sum(b.total2)
from table1 a, table2 b
where a.nomor = b.nomor
group by b.nomor
order by b.nomor;
[/sql:1:bd44738c28]
coba klo gini

_________________

website: http://darusmanaiman.net/
e-mail:
darusmanaiman@programmer.net
programmer@darusmanaiman.net
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
Wong_JowoOffline
Location:
Post subject:   PostPosted: 07/May/2008 16:28
onConfident


Joined: 13-Nov-2007
Posts: 27

Status: Offline
bisa kan...
group nya berdasarkan b.nomor, jadi dijumlahkan yang nomornya sama

code : pascal
  1. select b.nomor,a.tanggal,sum(b.total1) as total1, sum(b.total2) as total2
  2. from table1 a, table2 b
  3. where a.nomor = b.nomor
  4. group by b.nomor
  5. order by b.nomor;
Parsed in 0.002 seconds, using GeSHi
 
 View user's profile Send private message  
Reply with quote Back to top
Wong_JowoOffline
Location:
10 Post subject:   PostPosted: 07/May/2008 16:31
onConfident


Joined: 13-Nov-2007
Posts: 27

Status: Offline
walah lebih cepetan mas iman

kalah cepet dah nyonge
 
 View user's profile Send private message  
Reply with quote Back to top
slamet_linuxOffline
Location:
Post subject:   PostPosted: 07/May/2008 16:33
onIntermediate


Joined: 15-Feb-2007
Posts: 50

Status: Offline
      ImanD wrote:
[sql:1:9a15014412]
select b.nomor, a.tanggal, sum(b.total1), sum(b.total2)
from table1 a, table2 b
where a.nomor = b.nomor
group by b.nomor
order by b.nomor;
[/sql:1:9a15014412]
coba klo gini


maksudnya sum nya itu adalah hasil sum(b.total1), sum(b.total2) dan seterusnya
seandainya bisa -> sum(sum(b.total1), sum(b.total2), dst....)
 
 View user's profile Send private message  
Reply with quote Back to top
slamet_linuxOffline
Location:
Post subject:   PostPosted: 07/May/2008 16:38
onIntermediate


Joined: 15-Feb-2007
Posts: 50

Status: Offline
      Wong_Jowo wrote:
walah lebih cepetan mas iman

kalah cepet dah nyonge


he... he... tenang pa, masih belon habis... masih ada tuh...
 
 View user's profile Send private message  
Reply with quote Back to top
ImanD
Location: BeDeGe
Post subject:   PostPosted: 07/May/2008 16:56
onElite


Joined: 09-Oct-2005
Posts: 1313
Location: BeDeGe
      slamet_linux wrote:

maksudnya sum nya itu adalah hasil sum(b.total1), sum(b.total2) dan seterusnya
seandainya bisa -> sum(sum(b.total1), sum(b.total2), dst....)


ya tinggal di tambah az ko di buat susah, xixiixx
[sql:1:09dd8da70c]
select b.nomor, a.tanggal, sum(b.total1)+sum(b.total2) +..... AS TotalKabeh
from table1 a, table2 b
where a.nomor = b.nomor
group by b.nomor
order by b.nomor;
[/sql:1:09dd8da70c]

_________________

website: http://darusmanaiman.net/
e-mail:
darusmanaiman@programmer.net
programmer@darusmanaiman.net
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
ichan29Offline
Location:
Post subject:   PostPosted: 08/May/2008 09:00
onProfessional


Joined: 23-Feb-2007
Posts: 603

Status: Offline
      Quote:
ya tinggal di tambah az ko di buat susah, xixiixx
tambahin bro.. gitu aja kok repot.. ala gusdur Smile
cuman skrip itu hanya bisa jalan di mySQL keliatannya ya.. tp klo di MSSQL keliatannya ada kendala di [sql:1:7ac2811c38]GROUP By b.nomor[/sql:1:7ac2811c38] bener ngga ya
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |