insert

Combining Word Documents Without Losing the Individual Formatting

The Word documents I am trying to combine all have Headers and Footers, and I'm trying to combine them into one file while keeping the individual formatting of each document intact. I am using Word 2003 (XP Pro). I have tried a few different approaches already like placing the cursor in the Master document where I want to insert anothe...

Need some help trying to do a simple SQL INSERT with some simple data checking.

Hi folks, I have the following data in a table. Name LeftId RightId ------------------------------------------ Cat 1 Cat 2 Dog 4 Dog 5 Dog 7 Dog 69 Gerbil 12 ...

Dynamically create temp table, insert into temp table, and then select

Basically i want to be able to dynamically create a temp table based off of an existing table, and then insert values into the temp table, and select the inserted values. i've got the part where i can create the temp table working just fine, it's just that inserting and selecting form it aren't working too well. here's my current code....

MySQL After Insert and After Update Trigger

Hi! I have two tables t1 and t2. i have created two triggers tr1 after insert on t1 and tr2 after update on t2. in both the tables i m updating table t2. so, it is throwing an error saying the t2 table is already getting updated in another trigger so can not update it again. Please let me know if anyone has faced this type of problem a...

What's the most efficient way to insert thousands of records into a table (MySQL, Python, Django)

Hello, I have a database table with a unique string field and a couple of integer fields. The string field is usually 10-100 characters long. Once every minute or so I have the following scenario: I receive a list of 2-10 thousand tuples corresponding to the table's record structure, e.g. [("hello", 3, 4), ("cat", 5, 3), ...] I nee...

SQL: INSERT INTO...VALUES..SELECT..

How do i write INSERT statement if i get the values of colA from TableX, colB from TableY and colC from TableZ? eg: INSERT INTO TableA (colA, colB, colC) VALUES (?,?,?) Any ideas if it is possible? ...

Insert XML node at a specific position of an existing document

Hi, I have an existing XML document with some optional nodes and I want to insert a new node, but at a certain position. The document looks something like this: <root> <a>...</a> ... <r>...</r> <t>...</t> ... <z>...</z> </root> The new node (<s>...</s>) should be inserted between node <r> and <t>, resulting in: <root> ...

Move SQL Server data in limited (1000 row) chunks

I'm writing a process that archives rows from a SQL Server table based on a datetime column. I want to move all the rows with a date before X, but the problem is that there are millions of rows for each date, so doing a BEGIN TRANSACTION...INSERT...DELETE...COMMIT for each date takes too long, and locks up the database for other users. ...

Copying data between Oracle schemas using SQL

I'm trying to copy data from one Oracle schema (CORE_DATA) into another (MY_DATA) using an 'INSERT INTO (...)' SQL statement. What would the SQL statement look like? Thanks, ...

Document not ready for insert after method using a loop with jquery

Is there a way to use a loop to insert separate DIV elements behind each other? Right now I use a loop to do just that, but it doesn't remember the DIV inserted before with the load method. The result is that I only see the last one. The code is meant to show all messages, after it reads the cookie with the db-id when you first arrive ...

Does the entity framework preserve ordering when it does inserts into the database?

We plan on using identity columns in our sql server database. Currently we are using guids to generate unique ids, but it turns out that the ordering is relevant so we consider switching to identity columsn. Since ordering is relevant we want to make sure that the order in which we add objects to the entity context is also the order in...

Inserting multiple rows into Oracle

In the discussion about multiple row insert into the Oracle two approaches were demonstrated: First: insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE) select 8000,0,'Multi 8000',1 from dual union all select 8001,0,'Multi 8001',1 from dual Second: INSERT ALL INTO t (col1, col2, col3) VALUES ('val1_1', 'val1_2', ...

insert value in Mysql containg single quotes

How do I insert a Value in Mysql that consist of single of Double Quotes. i.e, Value: This is Ashok's Pen. This Single Quote will create problems. There might be other escape characters... How to insert the data properly.. Thanks in advance for ur precious time.. ...

How can I sum and replace column data and do averaging all in a MS Access query?

I am pulling data from one table, called analyzedCopy, and using it to over-rite all information in another table called analyzed. The columns I'm sorting/filtering/manipulating, are readings_miu_id, ReadDate, ReadTime, RSSI. I am currently moving data from analyzedCopy to analyzed using the following sql that to get only the last time(h...

How do I insert a large number of rows in MySQL?

How do I insert for example 100 000 rows into MySQL table with a single query? ...

MySQL: duplicate entry error with SELECT...INSERT INTO with UNIQUE constraint

I've got the following table: CREATE TABLE `products_quantity` ( `id` int(11) NOT NULL auto_increment, `product_id` varchar(100) NOT NULL, `stock_id` int(11) NOT NULL, `quantity` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `product_id` (`product_id`,`stock_id`), KEY `products_quantity_product_id` (`product_id`), KE...

ASP.NET insert from bll to mysql

I am trying to make an insert to an MySql database using a three layer solution (or what it might be called). I have done this may times with an MS-sql database and it has worked very well. But now when I am trying to make an insert I get the the ID can't be null. I thought the database took care of that. If I write an insert directly ...

Trigger that inserts into linked table causing an error

I'm having an issue with a trigger that inserts a value into the same tabled on a linked server. Here is the trigger in question ... USE [localDB] GO /****** Object: Trigger [dbo].[INS_New_Row] Script Date: 05/26/2009 10:50:56 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -...

MySQL Conditional Insert

I am having a difficult time forming a conditional INSERT I have x_table with columns (instance, user, item) where instance ID is unique. I want to insert a new row only if the user already does not have a given item. For example trying to insert instance=919191 user=123 item=456 Insert into x_table (instance, user, item) values (919...

Row insertion order entity framework

I'm using a transaction to insert multiple rows in multiple tables. For these rows I would like to add these rows in order. Upon calling SaveChanges all the rows are inserted out of order. When not using a transaction and saving changes after each insertion does keep order, but I really need a transaction for all entries. ...