thanks ya Mas Tomi 
atas pencerahannya memang field "remark" belum aku ikutkan 
thanks banget lho, kapan2 tanya lagi yah... 
semoga Tuhan Yang Maha Kuasa membalas kebaikan anda... amin

----- Original Message ----
From: Tomi Wijanto <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, 7 June, 2006 5:32:59 PM
Subject: Re: [indo-oracle] MERGE ANTAR TABEL

                          errornya pas di bagian INSERT, sesuai dengan deskripsi
 error yg didapat
   ORA-00947: not enough values
 
 Kalau tdk menyebutkan kolom2 yg mau diinsert ke
 target, maka jumlah kolom di source harus disebutkan
 semua
 
 when not matched then
   insert values (...)  -> semua kolom harus disebut
 
 Atau kalau memang hanya mau insert bbrp kolom doang,
 harus seperti ini
 
 when not matched then
   insert (a,b,c) values (x,y,z)
 
 regards,
 tomi
 
 --- ade trisna <[EMAIL PROTECTED] co.uk> wrote:
 
 > salam...
 > 
 > aqu mo merge data dari satu tabel ke tabel lain
 > dengan struktur tabel yang sama dalam satu database
 > tapi masih error (tabel sitejbro ke tabel site). ada
 > yang punya solusi?  thanx ya 4 solusinya
 > 
 > salam,
 > ade trisna
 > 
 > untuk scriptnya sbb:
 > 
 > SQL> conn nmc/[EMAIL PROTECTED]
 > Connected.
 > SQL> select * from tab
 >   2  ;
 > 
 > TNAME                          TABTYPE  CLUSTERID
 > ------------ --------- --------- ------- ----------
 > BSC                            TABLE
 > BTS                            TABLE
 > BTSTYPE                        TABLE
 > BTS_ADM                        TABLE
 > CELL                           TABLE
 > COVERAGE_TYPE                  TABLE
 > EMPLOYEES                      TABLE
 > GSN                            TABLE
 > HLR                            TABLE
 > IN_ERICSSON                    TABLE
 > IN_SIEMENS                     TABLE
 > 
 > TNAME                          TABTYPE  CLUSTERID
 > ------------ --------- --------- ------- ----------
 > MSC                            TABLE
 > MW                             TABLE
 > REGION                         TABLE
 > SITE                           TABLE
 > SITEJBRO                       TABLE
 > STATUS                         TABLE
 > STP                            TABLE
 > VENDOR                         TABLE
 > 
 > 19 rows selected.
 > 
 > 
 > 
 > SQL> desc site
 >  Name                                      Null?   
 > Type
 >  ------------ --------- --------- --------- -- --------
 > ------------ --------- -------
 >  SITE_ID                                           
 > VARCHAR2(255)
 >  SITE_NAME                                         
 > VARCHAR2(255)
 >  LONGITUDE                                         
 > VARCHAR2(255)
 >  LATITUDE                                          
 > VARCHAR2(255)
 >  STREET                                            
 > VARCHAR2(255)
 >  BUILDING                                          
 > VARCHAR2(255)
 >  RT_RW                                             
 > VARCHAR2(255)
 >  SUBDISTRICT                                       
 > VARCHAR2(255)
 >  DISTRICT                                          
 > VARCHAR2(255)
 >  CITY                                              
 > VARCHAR2(255)
 >  POST_CODE                                         
 > VARCHAR2(255)
 >  PROVINCE                                          
 > VARCHAR2(255)
 >  REGION                                            
 > VARCHAR2(255)
 >  BRANCH                                            
 > VARCHAR2(255)
 >  REMARK                                            
 > VARCHAR2(255)
 >  LastUpdate                                        
 > DATE
 > 
 > SQL> desc sitejbro
 >  Name                                      Null?   
 > Type
 >  ------------ --------- --------- --------- -- --------
 > ------------ --------- -------
 >  SITE_ID                                           
 > VARCHAR2(255)
 >  SITE_NAME                                         
 > VARCHAR2(255)
 >  LONGITUDE                                         
 > VARCHAR2(255)
 >  LATITUDE                                          
 > VARCHAR2(255)
 >  STREET                                            
 > VARCHAR2(255)
 >  BUILDING                                          
 > VARCHAR2(255)
 >  RT_RW                                             
 > VARCHAR2(255)
 >  SUBDISTRICT                                       
 > VARCHAR2(255)
 >  DISTRICT                                          
 > VARCHAR2(255)
 >  CITY                                              
 > VARCHAR2(255)
 >  POST_CODE                                         
 > VARCHAR2(255)
 >  PROVINCE                                          
 > VARCHAR2(255)
 >  REGION                                            
 > VARCHAR2(255)
 >  BRANCH                                            
 > VARCHAR2(255)
 >  REMARK                                            
 > VARCHAR2(255)
 >  LastUpdate                                        
 > DATE
 > 
 > SQL> merge into site s
 >   2   using sitejbro j
 >   3   on (s.site_id=j. site_id)
 >   4   when matched then
 >   5   update set
 >   6   s.site_name= j.site_name,
 >   7   s.longitude= j.longitude,
 >   8   s.latitude=j. latitude,
 >   9   s.street=j.street,
 >  10   s.building=j. building,
 >  11   s.rt_rw=j.rt_ rw,
 >  12   s.subdistrict= j.subdistrict,
 >  13   s.district=j. district,
 >  14   s.city=j.city,
 >  15   s.post_code= j.post_code,
 >  16   s.province=j. province,
 >  17   s.region=j.region,
 >  18   s.branch=j.branch,
 >  19   s.remark=j.remark,
 >  20   s.lastupdate= j.lastupdate
 >  21   when not matched then
 >  22   insert values
 >  23  
 >
 (j.site_id,j. site_name, j.longitude, j.latitude, j.street, j.building, 
j.rt_rw,j. subdistrict,
 >  24   
 >
 j.district,j. city,j.post_ code,j.province, j.region, j.branch, j.lastupdate) ;
 > merge into site s
 >            *
 > ERROR at line 1:
 > ORA-00947: not enough values
 > 
 > 
 > ##field branch,remark dan lastupdate tidak ikut##
 > SQL> merge into site s
 >   2  using sitejbro j
 >   3     on (s.site_id=j. site_id)
 >   4     when matched then
 >   5       update set
 >   6       s.site_name= j.site_name,
 >   7       s.longitude= j.longitude,
 >   8       s.latitude=j. latitude,
 >   9       s.street=j.street,
 >  10      s.building=j. building,
 >  11      s.rt_rw=j.rt_ rw,
 >  12      s.subdistrict= j.subdistrict,
 >  13      s.district=j. district,
 >  14      s.city=j.city,
 >  15      s.post_code= j.post_code,
 >  16      s.province=j. province,
 >  17      s.region=j.region
 >  18      when not matched then
 >  19      insert values
 >  20     
 >
 (j.site_id,j. site_name, j.longitude, j.latitude, j.street, j.building, 
j.rt_rw,j. subdistrict, j.district, j.city,j. post_code,
 >  21         j.province,j. region);
 > merge into site s
 >            *
 > ERROR at line 1:
 > ORA-00947: not enough values
 
 ____________ _________ _________ _________ _________ __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail. yahoo.com 
 
     
                    <!--  #ygrp-mlmsg {font:84.5% 
arial,helvetica,clean,sans-serif;} #ygrp-mlmsg table 
{font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% 
arial,helvetica,clean,sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} 
#ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } 
#ygrp-text p{ margin:0 0 1em 0; } #ygrp-tpmsgs{ font-family:Arial; clear:both; 
} #ygrp-vitnav{ padding-top:10px; font-family:Verdana; font-size:77%; margin:0; 
} #ygrp-vitnav a{ padding:0 1px; } #ygrp-actbar{ clear:both; margin:25px 0; 
white-space:nowrap; color:#666; text-align:right; } #ygrp-actbar .left{ 
float:left; white-space:nowrap; } .bld{font-weight:bold;} #ygrp-grft{ 
font-family:Verdana; font-size:77%; padding:15px 0; } #ygrp-ft{ 
font-family:verdana; font-size:77%; border-top:1px solid #666; padding:5px 0; } 
#ygrp-mlmsg #logo{ padding-bottom:10px; }  #ygrp-vital{ 
background-color:#e0ecee; margin-bottom:20px; padding:2px 0 8px 8px; } 
#ygrp-vital
 #vithd{ font-size:77%; font-family:Verdana; font-weight:bold; color:#333; 
text-transform:uppercase; } #ygrp-vital ul{ padding:0; margin:2px 0; } 
#ygrp-vital ul li{ list-style-type:none; clear:both; border:1px solid #e0ecee; 
} #ygrp-vital ul li .ct{ font-weight:bold; color:#ff7900; float:right; 
width:2em; text-align:right; padding-right:.5em; } #ygrp-vital ul li .cat{ 
font-weight:bold; } #ygrp-vital a { text-decoration:none; }  #ygrp-vital 
a:hover{ text-decoration:underline; }  #ygrp-sponsor #hd{ color:#999; 
font-size:77%; } #ygrp-sponsor #ov{ padding:6px 13px; background-color:#e0ecee; 
margin-bottom:20px; } #ygrp-sponsor #ov ul{ padding:0 0 0 8px; margin:0; } 
#ygrp-sponsor #ov li{ list-style-type:square; padding:6px 0; font-size:77%; } 
#ygrp-sponsor #ov li a{ text-decoration:none; font-size:130%; } #ygrp-sponsor 
#nc { background-color:#eee; margin-bottom:20px; padding:0 8px; } #ygrp-sponsor 
.ad{ padding:8px 0; } #ygrp-sponsor .ad #hd1{ font-family:Arial; 
font-weight:bold;
 color:#628c2a; font-size:100%; line-height:122%; } #ygrp-sponsor .ad a{ 
text-decoration:none; } #ygrp-sponsor .ad a:hover{ text-decoration:underline; } 
#ygrp-sponsor .ad p{ margin:0; } o {font-size:0;} .MsoNormal { margin:0 0 0 0; 
} #ygrp-text tt{ font-size:120%; } blockquote{margin:0 0 0 4px;} .replbq 
{margin:4;} -->  



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



------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/PhFolB/TM
--------------------------------------------------------------------~-> 

--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.lizt.org (NEW)
-----------------------------------------------

Bergabung dengan Indonesia Thin Client User Groups, 
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.vze.com 
Yahoo! Groups Links

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

<*> 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