Apabila input tanggalnya tidak berurutan, dan data terakhir yang dimaksud 
berdasarkan tanggal, maka perlu disort. Bila sebaliknya gak perlu.  :)
  ----- Original Message ----- 
  From: Ivan Leonardo 
  To: [email protected] 
  Sent: Wednesday, August 05, 2009 8:32 AM
  Subject: Re: [belajar-access] Buat query




  Nambahin dikit, perlu di sort/index by tanggal dulu ga ? kalo ga gimana 
taunya itu last record ?

  Murid Belajar Access wrote: 
      
     

    misalnya nama tabelnya adalah tabel tblContoh.

    SELECT tblContoh.[kode brg], Last(tblContoh.harga) AS HargaAkhir
    FROM tblContoh
    GROUP BY tblContoh.[kode brg];

      ----- Original Message ----- 
      From: Budi.P 
      To: Belajar Access 
      Sent: Tuesday, August 04, 2009 15:40
      Subject: [belajar-access] Buat query


      sore teman2,

      saya punya data sbb :

      kode brg   tanggal             harga
      001           01/01/2009     10.000
      001           02/01/2009     11.000
      002           01/01/2009      5.000
      002           02/01/2009      5.500


      yg sy mau tanyakan, bagaimana cara buat query-nya sehingga data yg 
ditampilkan adl kode barang yg harganya adalah harga yg terakhir :

      kode brg         harga
      001                11.000
      002                 5.500

      thks
      Budi



  ---------------------------------------------------------------------------
  This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system. E-mail transmission cannot be guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents of this 
message, which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version. 


  

Kirim email ke