Hi.
I need to find the best way to insert or update data in database using sql server and asp.net. It is a standard scenario if data exist it is updated if not it is inserted. I know that there are many topic here about that but no one has answered what i need to know.
So my problem is that there is really no problem when you update/in...
I have an 18GB flat file (40,000,000 records), with fixed column widths (no field terminators), which I would like to read into a SQL Server 2008 R2 table. In addition to the text file with the data, I was given an Excel document with the field names and lengths. There are 270 fields with 465 total characters per record (per row). Using ...
I want to bulk insert about 700 records into the Android database on my next upgrade. What's the most efficient way to do this? From various posts, I know that if I use Insert statements, I should wrap them in a transaction. There's also a post about using your own database, but I need this data to go into my app's standard Android da...
i would like to write
insert into tbl1(a,b)
select 123, (select id from tbl2 where status=987)
the problem is, only one row is inserted instead of many rows. How do i fix this?
using Sqlite.
...
Currently i'm using Alchemy as a ORM, and I look for a way to speed up my insert operation, I have bundle of XML files to import
for name in names:
p=Product()
p.name="xxx"
session.commit()
i use above code to insert my data paser from batch xml file to mysql,it's very slow
also i tried to
for name in names:
p=Produc...
Hello,
I am trying to copied records from one table to another as fast as possible.
Currently I have a simple cursor loop similiar to this:
FOR rec IN source_cursor LOOP
INSERT INTO destination (a, b) VALUES (rec.a, rec.b)
END LOOP;
I want to speed it up to be super fast so am trying some BULK operations (a BULK FETCH, then a FOR...
How can I make a big insertion with SqlBulkCopy from a List<> of simple object ?
Does I to implement my custom IDataReader ?
...
I'm bulk loading data and can re-calculate all trigger modifications much more cheaply after the fact than on a row-by-row basis.
How can I temporarily disable all triggers in PostgreSQL?
...
First off let me say I am running on SQL Server 2005 so I don't have access to MERGE.
I have a table with ~150k rows that I am updating daily from a text file. As rows fall out of the text file I need to delete them from the database and if they change or are new I need to update/insert accordingly.
After some testing I've found that ...
I am inserting data into SQL 2005 using SQLXMLBulkLoad.SQLXMLBulkload.3.0
My data table has following column:
objDataTable.Columns.Add("TaskDateTime", System.Type.GetType("System.DateTime"))
My bulk insert schema has following definition:
<xsd:element name="DepartureTime" type="xsd:date" />
(Using xmlns:xsd="http://www.w3.org/2001/XMLS...
Here is an example to use SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class -
[STAThread]
static void Main(string[] args)
{
try
{
SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class objBL = new SQLXMLBULKLOADLib.SQLXMLBulkLoad4Class();
objBL.ConnectionString = "Provider=sqloledb;server=server;database=databas...
hi i run python program where im inserting many many new entries to database,
this new entries are spread accross multiple tables.
what is the quickest way to load them into database?
at now im using something like this
LOAD DATA LOCAL INFILE file
INTO TABLE table
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(col1, col2, c...
I have a query which is working fine:
BULK INSERT ZIPCodes
FROM 'e:\5-digit Commercial.csv'
WITH
(
FIRSTROW = 2 ,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
but now I want to create a stored procedure for it.
I have written below code to make its stored procedure:
create proc dbo.InsertZipCode
@filepath varcha...