Forum Replies Created

Viewing 15 posts - 871 through 885 (of 3,348 total)

  • RE: Check if date ranges overlap

    Eric M Russell (2/10/2016)


    Hugo,

    My script returns the duplicate listed below, but your's appears to return none.

    MemNoYMDStart YMDEndYMDStart YMDEnd

    417 ...

  • RE: Reading .xml

    APparently Notepad++ requires a lot of memory when using large files. Perhaps you can close a few programs and try again? Alternatively, you could try finding and downloading other tools...

  • RE: Comma separate list as parameter

    When you use WHERE ItemCode IN (@Items), SQL Server considers @Items to be a single value. IN (@Item1, @Item2, @Item3) would work, but then you first need to split the...

  • RE: Check if date ranges overlap

    Expanding a bit on Eric's reply:

    1. For the primary key, I would just use MemNo, YMDStart. Then I would also add a UNIQUE constraint on MemNo, YMDEnd.

    2. Slightly simpler (and...

  • RE: Reading .xml

    ramana3327 (2/10/2016)


    Thank you.

    How do we know it is encrypted or compressed?

    Ask the people who created the file.

    When I try to edit with Notepad ++ I can see only one...

  • RE: Check if date ranges overlap

    WOW. I spent five minutes typing that reply, and then two others already replied during that time. Talk about overlapping intervals... 😉

  • RE: Check if date ranges overlap

    First: To help us help you, please always post a full repro script: CREATE TABLE (including constraints and indexes), INSERT statements with a limited but illustrative set of sample data,...

  • RE: indexes on foreign keys

    You mostly got it right already. Indexes are automatically created for primary keys and for unique constraints. They are not automatically created for foreign key constraints.

    It is often (bot not...

  • RE: Syntax Help Please

    mw112009 (2/10/2016)


    Jeff M:

    Please refer to Post #1760015.

    I changed the code to include 2 extra rows in table @a that are not in table @b-2.

    So you definitely have to use both...

  • RE: TVF suddenly slow

    You are right that there is no plan for the iTVF itself. But there are cached plans for all queries using it.

    Changing the iTVF invalidated those plans, so new plans...

  • RE: Converting SQL error message to a number

    Emma.Thackwray (2/10/2016)


    Hi

    I am linking the results of an SQL query within MS Excel and I was wondering whether anyone knows how to convert an error message returned by SQL into...

  • RE: Syntax Help Please

    Jeff Moden (2/10/2016)


    Instead of scanning the table twice, my suggestion would be to use a GROUP BY WITH ROLLUP and simply sort the output based on GROUPING().

    There's two tables and...

  • RE: Reading .xml

    ramana3327 (2/10/2016)


    It is opening in the notepad but not readable. So I can't able to copy the content

    Then the file is not valid xml. Xml is always normally readable.

    Check with...

  • RE: Transaction log sizing of read-only databases

    keymoo (2/10/2016)


    What is best practice for sizing a read-only database transaction log. There may be some cross-database joins. My hunch is that the transaction log can be tiny. I have...

  • RE: A cautionary tale on the 2014 CE

    The comments on the Register site show an incredible lack of understanding of SQL and its internals. But hey, this is the internet, you don't need to udnerstand something befeore...

Viewing 15 posts - 871 through 885 (of 3,348 total)