Showing posts with label updatequot. Show all posts
Showing posts with label updatequot. Show all posts

Friday, March 16, 2012

"Process Update" and "Process Incremental" no longer supported for SQL 2005

I've installed SQL 2005 service pack 1, and I found that process update and process incremental is disappeared in the process option. Is this no longer supported?

Thanks!

Kelvin Jor

There got to be some mistake. What object you are talking about.

Different objects have different processing options applied to them.

Take a look at this paper, it has a table listing objects and options applied to them: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5_asprocarch.asp

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, March 11, 2012

"ON DUPLICATE KEY UPDATE"?

Hi,

I am migrating from MySQL to SQL Express. In MySQL, I import data from Oracle using the "INSERT INTO .... ON DUPLICATE KEY UPDATE". With the "ON DUPLICATE KEY UPDATE", when there is a duplicate key in MySQL exists, the respective records will be updated (so to avoid inserting the data twice). I cannot remove the duplicated rows in MySQL as it contains extra fields with user-input value.

Is there any way I can do the same in SQL Express? Is it a must that I need to create a temp table to hold the downloaded data and then update the duplicated data in the original before an INSERT?

Thanks

Raymond

There is no equivalent functionality. You can however do the following:

1. You can create an unique index on the key column(s) with the IGNORE_DUP_KEY option set to on. This will result in the duplicate rows being ignored during the INSERT operation for instance. You will have to however update the rows by inserting into another table and then performing update

2. Use a worktable approach where you insert all the rows into the worktable and then use insert/update as into the main table.

|||

Thanks,

I think I will go for the second option, as there is only a few new records (inserts) every time, and most the other records involve changes (updates).

Raymond