mungkin kira2 begini 

delete stock
where trim(cd_lokasi) not in ( select trim(cd_lokasi) from lokasi )



CMIIW,
eldien
To: [email protected]
From: [email protected]
Date: Mon, 7 Dec 2009 20:55:39 +0800
Subject: [indo-oracle] delete yang tidak sama dengan


















 



  


    
      
      
      Hello indo-oracle,



bagaimana script menghapus record yang tidak ketemu atau tidak sama

  dengan.

  klu untuk sama dengan saya bisanya bikin seperti ini.



for i in

     (

      select

        a.cd_lokasi    as cd_lokasi

      from

       lokasi a

     )

   loop

     delete stock x

     where

       trim(x.cd_lokasi) = trim(i.cd_lokasi)

       and nvl(x.a_pcs,0) = 0

       and nvl(x.s_pcs,0) = 0 ;

   end loop ;



-- 

Best regards,

fansul

mailto:[email protected]



__________________________________________________

Apakah Anda Yahoo!?

Lelah menerima spam?  Surat Yahoo! memiliki perlindungan terbaik terhadap spam  

http://id.mail.yahoo.com 






    
     

    
    






                                          
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail 
you.
http://www.microsoft.com/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-id:SI_SB_3:092010

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



------------------------------------

--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [email protected]
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indo-oracle/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/indo-oracle/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Kirim email ke