Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 23:56

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



bulk import hilfe

Discussion on bulk import hilfe within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
xXwaldeXx's Avatar
 
elite*gold: 46
Join Date: Jul 2009
Posts: 176
Received Thanks: 21
Question bulk import hilfe

Hi,
ich möchte in meine Tabelle Email Adressen aus einer Datei importieren, aber hab keine Idee wie ich das machen soll.Bis jetzt hab ich was von "bulk insert" gelesen, weiß jedoch nicht wie ich das anwenden soll oder kann..
Wenn jemand weiß wie man mit Datenbanken also sql-zeug umgeht, kann er mir gerne helfen

mfg
xXwaldeXx is offline  
Old 05/13/2015, 10:19   #2
 
elite*gold: 13849
Join Date: Oct 2014
Posts: 673
Received Thanks: 219


In dem Link ist dies zu finden:
Quote:
The Oracle JDBC driver does support bulk inserts. What you can do is that you add all your data to a “batch” and then execute the entire batch. This gives you the advantage that there is only 1 INSERT statement executed which inserts all your data into the table at once! So instead of 10,000 round-trips, I only have 1 sending all the data over in one big chunk:
Code:
conn.prepareStatement("TRUNCATE TABLE testloadtable").execute();
conn.prepareStatement("ALTER SESSION SET SQL_TRACE=TRUE").execute();
 
PreparedStatement stmt = conn.prepareStatement("INSERT /* addBatch insert */ INTO testloadtable (id, text) VALUES (?,?)");
 
for (int i=0;i<10000;i++)
{
  stmt.setInt(1, i);
  stmt.setString(2, "test" + i);
  stmt.addBatch();
}
stmt.executeBatch();
conn.commit();
 
conn.prepareStatement("ALTER SESSION SET SQL_TRACE=FALSE").execute();
Du musst bei jeden Eintrag .addBatch() aufrufen und es dann mit .executeBatch() vollenden.
Lee Ki-Hwan is offline  
Reply


Similar Threads Similar Threads
Dll Import
01/28/2014 - CO2 Programming - 11 Replies
well i've been studying C# till Now but i couldnt understand this part ... Why would i need to use External Dll Files ? and How do i know that im using the Right Dll ? i've Seen many Example of ppls using User32.Dll Or Kernel.Dll .. what are these Dlls Provide ? and i've seen Alot Or Parameters being used when these Dlls are used in the Project ..so i need Help in This Regards shadowman123
Navicate Database Import hilfe pls
09/14/2012 - Metin2 Private Server - 0 Replies
Hallo, Habe von Serverfiles eine Mysql database mit ordnern: Mysql,Account,Player,Metin2_Runup ..... Hab ne Database erstellt mit Account aber wie füge ich die Daten vom ordner da ein? Sind MYD und FRM daten kann mir jemand bitte helfen
Steam UK/US Import
12/22/2010 - Technical Support - 10 Replies
Hallo wollte mal wissen ob man gebannt werden kann wenn man sich Spiele ausdem Ausland holt UK per Amazon und Us per Steam wollte wissen ob man da gebannt werden kann oder ob es okey ist gab mal ein Us User hier auf Epvp die hat US Steam Gifts verkauft (man zahlt den US Preis und sie "schenkt" einem das ) bitte nur Antworten mit Beweisen zitate oder Links am besten übersetzt gruß
import?
09/29/2009 - General Coding - 8 Replies
Hi, in dem Quellcode einer datei aus einem entpackten Spielclienten habe ich folgendes drinstehen (die punkkte sollen nur heisen das davor und danach noch was kommt) ... import snd import chat import textTail import snd import net
Import
05/25/2006 - Off Topic - 4 Replies
Moin Also, Im internet werden öfters solche importhändler listen wie zb bei www.importer-scout.de angeboten Jetzt würde ich mich dafür interresieren ob jemand schonmal dafür bezahlt hat und ob es sich lohnt etc Oder villeicht wer einige importhändlerlisten aus china etc kennt wo man möglichst billig produkte zum weiterverkauf herbekommt Würd mich über eure meinungen freun auch über PM



All times are GMT +1. The time now is 23:56.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.