Forum Replies Created

Viewing 15 posts - 406 through 420 (of 541 total)

  • RE: Duplicate Indexing Woes

    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...
  • RE: Duplicate Indexing Woes

    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...

  • RE: advanced TSQL

    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...

  • RE: SQL Index Tables Out Of Sych - How?

    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...

  • RE: Newbie Question: Help with select statement

    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...

  • RE: Simple "IF" Logic in Package

    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...

  • RE: Function with variable table and column name

    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...

  • RE: Simple "IF" Logic in Package

    Excellent! Thank you, md40 and salim; you've got my pointed in the right direction.

    cl

  • RE: Simple "IF" Logic in Package

    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...

  • RE: large table

    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,...

  • RE: Function with variable table and column name

    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...

  • RE: Select Statement Using Not In and Null Values

    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...

  • RE: Simple "IF" Logic in Package

    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...

  • RE: Application Timeouts

    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...

  • RE: large table

    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...

Viewing 15 posts - 406 through 420 (of 541 total)