Viewing 15 posts - 406 through 420 (of 541 total)
Correction to the script below:
select
seed.TableName
,si.[Name] as IndexName
,si.indid
From
(select si.[ID] as TableID, so.Name as TableName, si.Keys, count(*) as IndexCount
Fromsysindexes si (nolock)
JOIN sysobjects so (nolock) on...
December 15, 2003 at 7:42 pm
I wrote the script below and it works beautifully for me. This is looking for duplicates in the sysindexes.keys column, which according to BOL is the "List of the...
December 15, 2003 at 7:30 pm
I hate cursors. when I'm forced to I'll use a while loop and control it through a select and an incremented controler variable.
if object_ID('tempdb..#ExSource') is not null drop table...
December 10, 2003 at 2:12 am
Stahura,
with SQL, duplicate data usually occurs because of duplicate data.
select *
From
(
select 'A' c, 'data' i, 'this is unique' n
union all
select 'B' c, 'data' i, 'this is unique' n
) notdups
JOIN
(
Select...
December 10, 2003 at 1:40 am
Dammek, the reason mdaniel's query doesn't work is because your rows don't have a unique identifier. noeld's works great, though, because you can join on both the ID column...
December 10, 2003 at 1:22 am
Thanks Salim. Our needs are much simpler than what the DBPropagator seems to offer. Also, if I can't do this cheap I can't do it at all.
Basically, Transactional...
December 8, 2003 at 12:06 pm
That is not the way you want to do it, then, as it requires an execute...all dynamic code must have an Exec. I think you're on the wrong track...
December 4, 2003 at 2:12 pm
Excellent! Thank you, md40 and salim; you've got my pointed in the right direction.
cl
December 4, 2003 at 2:00 pm
Yeah...I'm not so interested in the data warehousing side; I've got that down pat.
The main this I'm insterested in is how most people connect to an AS400 file and transfer...
December 3, 2003 at 3:41 pm
test test test...
Also, Normalization:
Is there redundant data in the table?
Can this table be broken up into x number of smaller tables?
DateTypes: avoid char and varchar if possible,...
December 3, 2003 at 3:37 pm
Technically, you can do this, although it's not optimal, as the Query is not compiled.
you can run the following on pubs...
use pubs
/*----------------------------------------------------
create function that returns query text
*/----------------------------------------------------
if object_ID('GetMax') is not...
December 3, 2003 at 1:41 pm
Yes, "not exists" with a correlated subquery is way faster than "not in".
I've tested all these methods, and using a left join and looking for a null is fastest (beats...
December 3, 2003 at 12:33 pm
md40,
phillcarts pointing you in the right direction; SQLDTS has some great techiniques for control of flow and looping.
I'm really interested in what you said about bringing data from the AS400...
December 3, 2003 at 12:25 pm
Trust me, jarretg, you should get rid of rowlock, bet your problems will go away.
However, I DO use nolock whenever the consequences (not the risk) of a dirty read is...
December 3, 2003 at 12:19 pm
Absolutely the most important thing in a large table is it's clustered index. Optimizing this will help you more than partioning or any hardware mods.
Ideally the clustered...
December 3, 2003 at 12:11 pm
Viewing 15 posts - 406 through 420 (of 541 total)