Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)

  • RE: compare files in directory to SQL table

    If you want to do this using a stored procedure, maybe the code below will help...

    DECLARE @RowCnt int

    CREATE TABLE #DirList (RowId int IDENTITY (1,1), OneField varchar(2000))

    INSERT INTO #DirList

      EXEC master..xp_cmdshell...

  • RE: One Big Table To Two Smaller Ones

    24 hours to run a report on a 12 million rows table sounds a bit excessive if you ask me. Have you defined any indexes on your tables referenced...

  • RE: Using select distinct

    Just a word of WARNING on the query below:

    SELECT *

    from XXX

    where R1 in (select R1

    from XXX

    group by R1

    having count(*) = 1)

    It is NOT the same as DISTINCT!!!!

    It will ONLY return...

  • RE: Comparing two tables

    Something else to try

    (Found this code on one of these useful SQL Server websites and it works pretty well for me) :

    /*

    SQL Script for Comparing the Contents of Two...

  • RE: Select INTO using Query

    When you say it doesn't work, what exactly do you mean? Syntax error or no results returned?

    I would have just added a alias for the derived table used, e.g.

    SELECT...

  • RE: Track Table Structure Changes

    Hi there

    I'm by no means a guru, but have thought about this issue myself recently. Haven't done it yet, but maybe my initial train of thought might help you...

  • RE: Table Structure Change

    Hi there

    I'm by no means a guru, but have thought about this issue myself recently. Haven't done it yet, but maybe my initial train of thought might help...

  • RE: Slow Query on Cluster

    quote:


    Have you taken a look at your indices? Are they consistent between your development and live environments? Another thing is...

Viewing 8 posts - 1 through 8 (of 8 total)