Archives: February 2013
"An item with the same key has already been added."
"An item with the same key has already been added."
Based on some quick googling, it looks like there are several potential causes for the error, but here's…
0 comments, 190 reads
Posted in SQL Tact on 28 February 2013
Script Out Foreign Keys With Multiple Keys
For example,
--Script 1 create table dbo.fktable1( id1 int not null , id2 int not null , id3 int…
0 comments, 169 reads
Posted in SQL Tact on 18 February 2013
Using Foreign Keys to Determine Table Insertion Order
with cteFK (pktable, fktable) as (
select
pktable = o1.name
, fktable = isnull(o2.name, '')
from sysobjects o1
left join sysforeignkeys fk on o1.id = fk.fkeyid
left…
0 comments, 127 reads
Posted in SQL Tact on 17 February 2013
Adding the Clustered Key To Your Nonclustered Index? Part 2
What if the table has a compound primary key? See comments for a play-by-play.
0 comments, 136 reads
Posted in SQL Tact on 5 February 2013
Adding the Clustered Key To Your Nonclustered Index?
From my colleague:
Why would you ever need…
1 comments, 155 reads
Posted in SQL Tact on 4 February 2013



Subscribe to this blog