» Home » insert » Page 1
bulk insert to SQL Server, insert statements vs one insert XML statement?
by TheStu in Programming Languages

The application layer (ColdFusion) needs to insert multiple rows into SQL Server 2005.


I was thinking of using loop in app layer to construct multiple input statements and send to SQL Server over JDBC in a single connection.


My colleague however suggests to construct an XML and bulk insert the XML instead.


Which one is the better method?


mysql conditional insert - if not exists insert - multi value insert
by SMOGZINN in Databases

From my previous question this was the solution I am accepting:


INSERT IGNORE INTO table_name
SET name = 'phill',
value = 'person',
id = 12345;

But I also wanted to know if I could be multiple values like this


INSERT IGNORE INTO table_name
SET (name = 'phill', value = 'person', id = 12345),
(name = 'bob', va

Insert multiple records using one single insert statement in EXEC of Stored procedure
by smbrant in Databases

In sql server 2008, i have a store procedure which has insert statement , now i want to insert multiple records at a time into table via EXEC.


MY Store Procedure:


insert into tblUser(fullname, email, loginID, password, DOB, question, answers,doc,roleid)
values (@fullname,@email,@loginID,HASHBYTES('sha512',@password),@dob,@question, @answers, GETDATE(),@roleid )<


I dont want to insert the PK val.But - Cannot insert explicit value for identity column in table 'Employees' when IDENTITY_INSERT is set to OF
by shortylickens in Coding

I am using the Entity Framework to update my database.
The Employee table has an employeeId primary key field.
When I instantiate an employee object, the employeeId defaults to zero.
I want to insert the employee object into the database, ignoring the primary key value of zero.
Yet I get this exception;
Cannot insert explicit value for identity column in table 'Employee


How to properly insert values into the SQLite database using ContentProvider's insert() method through a CursorLoader?
by dormsbee in Programming Languages

I was reading the doc, but I am still not too sure. Its says to use getContentResolver(), but then that really isn't using CursorLoader. So is there a way to do it through CursorLoader? I know how to do it with query(). Are the steps very similar? Even just a link that explains exactly this would be helpful.


Please note, do not link me to the G


PHP MySQL INSERT data from another table using the where clause and insert unique values to the same rows
by peitschie in Programming Languages

I want to insert data from one table into another where one field equals another in both tables. So far this works. The problem is, I also need to insert additional data into those same rows that is not included on the first table.


//enter rows into database
foreach($_POST['sku'] as $row=>$sku)
{
//this is the data that needs to be added to the table
$i

Generate generic insert statement from existing row for disconnected insert to another database for sync
by akr in Databases

We currently have a c# console app that creates a sync table from triggers that allows the app to send an insert update or delete statement to another copy of the database at another site. This keeps the tables in sync, however the system regularly crashes and we do not have the source code.


I am currently trying to recreate this in sql server.


The sync table is generate


One Stored Procedure to insert one table and retrieve ID and insert multiple tables
by Wesley D. Radcliffe in Databases

I have 3 tables and columns. ex: Green (userID, Name, Address), Red (userID, TemproraryAddress), Blue (userID, WorkPlace).


I want to insert data into Green while userID is auto incremented int and unique id. After inserting those details want to retrieve userID and insert into Red and Blue Tables in one stored procedure


Note: This example table is to show a sample scenar


Cannot insert data using tableadapter.insert method due to an Auto-Increment field
by Kevin in Programming Languages

I need your help since I cannot locate an answer anywhere on the web for my problem.


I'm using C# and I have a table called "People" and I want to use an TableAdapter to add/delete to/form that table. I'm using an sdf file as my database as a "Microsoft SQL Server Compact 4.0 (.NET Framework Data Provider for Microsoft SQL Server Compact 4.0)" Data Source.


my code looks


how to insert in a date/time ms access field using java sql INSERT query
by crooter in Java

I want to add some date and time in the MS Access, but my date and time variable is a string. i.e


String dt="12/2/2014 9:00 PM"; //this is selected from a calender component and a ComboBox

While MS Access field's type is (Date/Time). How to convert my string to date/time type so that it can be inserted to the field? Can you please illustrate with some line of


Next



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .