Forum Replies Created

Viewing 15 posts - 1,576 through 1,590 (of 3,543 total)

  • RE: SELECT query question

    quote..overall the performance should be better...

    Yes I was thinking of adding another post to indicate that what I...

  • RE: SELECT query question

    SELECT a.AccountNumber,a.InvoiceNumber,a.InvoiceDate,a.RowID

    FROM [InvoiceTable] a

    WHERE a.RowID IN (SELECT TOP 2 b.RowID

        FROM [InvoiceTable] b

        WHERE b.AccountNumber = a.AccountNumber

        ORDER BY b.RowID DESC)

  • RE: SQL Query Prob

    I would move

    And actualClub.Type = 0

    to the LEFT JOIN, ie

    LEFT JOIN Club actualClub ON actualClub.Id = s.ClubId AND actualClub.Type=0

  • RE: need help in my query and data return it

    déjà vu

    I gave details of problem like this in another post

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=9&messageid=360507#bm360559

    If this is a one off then you would be better...

  • RE: problem in query stmts

    declare @ProjectCode char(20)

    you have declared this as char and sql will add trailing spaces to values less than 20 char in length

    set @ProjectCode='1110201BA'

    will have trailing spaces (see...

  • RE: Question of the Day for 24 Apr 2007

    CASE is neither a 'statement' nor an 'expression' it is a function, it just happens to take expressions for input and produces an expression for output.

  • RE: Stored procedure problem

    I tested the logic of the code you posted and could not replicate your problem, the INSERT command was always executed, so I still stand by my original post.

    I would...

  • RE: Selecting consecutive values

    Maybe this

    SELECT a.c As [ThisRow],

    (SELECT MIN(b.c) FROM b WHERE b.c > a.c) As [NextRow]

    FROM a

  • RE: Import txt file with first character of each row is ''''NUL'''' - DTS

    NUL chars will cause errors in DTS when you try to configure Text File. NUL is not settable as a delimiter and it will terminate reads as well.

    Your only option...

  • RE: Help With A Trigger

    Looks OK to me

    The trigger will fire for any INSERT/UPDATE regardless of DDT_DOCU_PRINT_TEXT update or not

    The IF UPDATE test restricts the update to only when DDT_DOCU_PRINT_TEXT is updated

    Also remember that...

  • RE: Using an UNC name in wScript.Shell

    quote...what account SQL Server is running under...

    In EM

    Locate the server

    Right click on the server

    Select properties

    Select the Security tab

     Startup...

  • RE: TOP 1000.....

    quoteAnd the 'summary' is taking forever to query...

    If you are summarising 200 mil rows then it will take...

  • RE: TOP 1000.....

    So what is 'taking forever to query'

    The transfer of data from ServerA to ServerB?

    Or the summary?

    Why the transfer, is it possible to summarise the data on the server that holds...

  • RE: TOP 1000.....

    Without a unique key you will not be able to select the data in chunks because there is no guarantee for the order of the data without an 'ORDER BY'...

  • RE: TOP 1000.....

    Only if there is a unique key which you can use as part of the select to get greater than the value in the last row retrieved. I don't think...

Viewing 15 posts - 1,576 through 1,590 (of 3,543 total)