I have a code that loads my data in SQL table; I should know that if there is a duplicate value There is no way to load the data into another table. If so, you can help me my question is:
< P> which will insert the data into"t_DATA_DneFrc (RTN, AccountNbr, first, MiddleName, last name, amount) included in prices ( '" & amp; rcdDNE ("RTN") & amp; "','" & "rcdDNE" ("AccountNbr") & amp; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & amp; # 39; & amp; amp; amp; amp; rcdDNE ("First") & amp; rcdDNE ( "MiddleName") & amp; " ',' '& amp; rcdDNE (" LastName ") and"' 'and Arseedeediani ( "Zodiac") and "')"
t_DATA_DneFrc
. Now I want to change the query if I enter a duplicate which has the line in the t_DATA_DneFrc duplicate
is it possible is? 'Record Database frmDNELoad.lblStatus.Caption = "Loading data in the database ......" dim lngRecCount long as lngRecCount = 0 rcdDNE.MoveFirst cmdCommand with. ActiveConnection = objConn .CommandText = "t_DATA_DneFrc (RTN, AccountNbr, first, MiddleName, last name, amount) values (included in '" & amp; rcdDNE ( "RTN") & amp; "', '' & amp; rcdDNE ( "AccountNbr") & Amp; "", "" and "Arseedeediani" ( "first name") and "", "" and Arseedeediani ( "Midlnam") and "", "" and Arseedeediani ( "last name") and " ',' '& Amp; Arseedeediani (" Zodiac ") and") ". type Command = Adisimditekst and set new Adiodibi with Arseedeediaarsisi = Ardeediaarsiaarsiad. Rikesset. Aktivconkeshn = Objon. source T = "Select * FD TDATAADNEFRC" .Quser Type = Add Open Dynamic .Kerser Position = AdUseClient .LockType = adLockOptimistic. End of Finish with rcdDNE.EOF lngRecCount = lngRecCount + 1 frmDNELoad.lblStatus.Caption = "Adding Record" Do & amp; LngRecCount & amp; "of" & amp; Arseedeediani. Rikardkount & amp; "for the database." FrmDNELoad.Refresh DoEvents call CommitNew rcdDNE.MoveNext loop frmDNELoad.lblStatus.Caption = "Diani processing complete." frmDNELoad. Refresh End Event Sub CommitNew () 'rcddnefrc .equality. AddNew .Finds with records on DneFrc table added ! [RTN] = rcdDNE.Fields! [RTN] .Fields! [AccountNbr] = rcdDNE.Fields! [AccountNBR]. Fields! [First] = rcdDNE.Fields! [First] .Fields! [MiddleName] = rcdDNE.Fields! [MiddleName] .Fields! [Last name] = rcdDNE.Fields! [LASTNAME] .Fields! [Zodiac] = rcdDNE Field! [Zodiac].
You will need to run a second query, which like
look should t_DATA_DneFrcDuplicate (RTN, AccountNbr, first, MiddleName, last name, select the amount, frequencies) RTN, AccountNbr, first, MiddleName, last name, amount, COUNT putting (*) Artian, account Anbiar , first debits from Midlnam, Lastonam by Teediattiadianfarsi group with (COUNT) (*) & gt; 1
(This is the Oracle syntax; hopefully it will work for you.)
No comments:
Post a Comment