Ok terimakasih bro.. 

btw buat lihat cost dari query di oracle caranya gmn bro?

 

From: [email protected] [mailto:[email protected]] On
Behalf Of wendi gunawan
Sent: Wednesday, June 23, 2010 4:19 PM
To: [email protected]
Subject: Re: [indo-oracle] ask query SQL

 

  

klo ingin lebih cepat querynya..
lalakun filter lebih awal..baru di union kan...

2010/6/22 Akah <[email protected] <mailto:akah%40toyotatsusho.co.id> >

>
>
> Yup setuju dengan bung Wadi, sebaiknya diperhatikan lagi normalisasinya.
>
> Oh iya kalau dibanding dengan
>
> SELECT * FROM
>
> (SELECT ID_COMPANY, CARA_BAYAR, BAYAR FROM HR.TABLE_A
>
> UNION SELECT ID_COMPANY, CARA_BAYAR, BAYAR FROM HR.TABLE_B
>
> UNION SELECT ID_COMPANY, CARA_BAYAR, BAYAR FROM HR.TABLE_C) X
>
> WHERE X.CARA_BAYAR='TUNAI'
>
> Costnya besaran mana ya bro?
>
> From: [email protected] <mailto:indo-oracle%40yahoogroups.com>
<indo-oracle%40yahoogroups.com> [mailto:
> [email protected] <mailto:indo-oracle%40yahoogroups.com>
<indo-oracle%40yahoogroups.com>] On
> Behalf Of Wadi Achmed
> Sent: Tuesday, June 22, 2010 5:51 PM
> To: [email protected] <mailto:indo-oracle%40yahoogroups.com>
<indo-oracle%40yahoogroups.com>
> Cc: Aud Solehuddin
> Subject: Re: [indo-oracle] ask query SQL
>
>
> Pertama: Maaf, saya balik nanya.
> Kenapa tablenya ada 3 kalau atribut dan fungsinya sama semua?
>
> Solusinya:
>
> Kalau tablenya satu (nama table asumsi table_bayar):
> ------------------------------
> Select id_company, bayar
> from table_bayar
> where cara_bayar = 'tunai';
>
> Kalau masih maksa pake 3 table
> ------------------------------
> select id_company, bayar
> from table_a
> where cara_bayar = 'tunai'
> union all
> select id_company, bayar
> from table_b
> where cara_bayar = 'tunai'
> union all
> select id_company, bayar
> from table_c
> where cara_bayar = 'tunai';
>
> Sekali lagi saya sarankan diubah tablenya cukup satu aja.
> Coba pelajari lagi konsep normalisasi database.
>
> Cheers,
> Wadi Achmed
>
> On 6/22/2010 5:08 PM, Aud Solehuddin wrote:
> > Dear all, terimakasih sebelumnya, minta bantuan nyari query SQL untuk
> select dari table berikut :
> >
> >
> >
> > misal saya punya tiga table,
> >
> >
> >
> > table A
> >
> > id_company
> >
> > cara_bayar (tunai, bni, bca)
> >
> > bayar
> >
> > field lain2
> >
> >
> >
> > table B
> >
> > id_company
> >
> > cara_bayar (tunai, bni, bca)
> >
> > bayar
> >
> > field lain2
> >
> >
> >
> > table C
> >
> > id_company
> >
> > cara_bayar (tunai, bni, bca)
> >
> > bayar
> >
> > field lain2
> >
> >
> >
> > contoh isian :
> >
> > table A
> >
> >
> >
> > PT Coba
> >
> > 200000
> >
> > tunai
> >
> >
> >
> > table B
> >
> > PT Tes
> >
> > 500000
> >
> > bni
> >
> >
> >
> > table C
> >
> > PT Sample
> >
> > 1000000
> >
> > tunai
> >
> >
> >
> > hasil yang diharapkan (tampil yang tunai) :
> >
> >
> >
> > id_company bayar
> >
> > PT Coba 200000
> >
> > PT Sample 1000000
> >
> >
> >
> > bagaimana cara saya menampilkan id_company dan bayar, yang memiliki cara
> bayar ='tunai'
> >
> >
> >
> > makasih atas bantuannya semuanya.. :)
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------------------
> >
> > --
> > -----------I.N.D.O - O.R.A.C.L.E---------------
> > Keluar: [email protected]
<mailto:indo-oracle-unsubscribe%40yahoogroups.com>
<indo-oracle-unsubscribe%40yahoogroups.com>
>
<mailto:indo-oracle-unsubscribe%40yahoogroups.com<indo-oracle-unsubscribe%25
40yahoogroups.com>>
>
> > Website: http://indooracle.wordpress.com
> > http://www.facebook.com/group.php?gid=51973053515
> > -----------------------------------------------
> >
> > Bergabung dengan Indonesia Thin Client User Groups,
> > Terminal Server, Citrix, New Moon Caneveral, di:
> > http://indo-thin.blogspot.comYahoo! Groups Links
> >
> >
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
> Please consider the environment before print out this email
> ===================================================================
> ==This message was scanned by Toyota Tsusho Indonesia Email Server Anti
> Virus==
> ===================================================================
>
>
> [Non-text portions of this message have been removed]
>
> 
>

-- 
wendi gunawan
Java Software Developer & penulis (new bie)
terus belajar untuk tidak cinta dunia
http://oretanwendi.wordpress.com/
hp:085624046906

[Non-text portions of this message have been removed]





Please consider  the environment before print out this email
===================================================================
==This message was scanned by Toyota Tsusho Indonesia Email Server Anti Virus==
===================================================================


[Non-text portions of this message have been removed]

Kirim email ke