Forum Replies Created

Viewing 15 posts - 2,536 through 2,550 (of 4,085 total)

  • RE: how to find number of days between successive visists?

    HappyGeek (7/11/2016)


    drew.allen (7/11/2016)


    Since all records within a partition necessarily have the same value for each field in the PARTITION BY clause, there is no reason to include any of those...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: how to find number of days between successive visists?

    HappyGeek (7/11/2016)


    I felt it was a bit odd that patients seemed to only exist in isolation and that another wasn't seen until the previous had completed treatment (so to speak)...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Replacing self closing tag for empty tag in for XML explicit

    The two are equivalent and any XML parser should be able to handle either of them, so why "must" it be in the form "<tag></tag>"? In fact, "<tag/>" is...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: problem converting date on procedure.

    Sergiy (7/7/2016)


    drew.allen (7/7/2016)


    Sergiy (7/6/2016)


    It's actually another way around - it's you who did not provide any rationale for using CAST rather than CONVERT in any cases.

    Actually, I did provide my...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Maintaining Sequence of OUTPUT rows during INSERT

    The Dixie Flatline (7/7/2016)


    Drew, that sounds like the answer to a maiden's prayer, and I'd like to remember it for future reference, but after reading your note I looked at...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Maintaining Sequence of OUTPUT rows during INSERT

    The Dixie Flatline (7/7/2016)


    drew.allen (7/7/2016)


    If you change your INSERT to a MERGE, then you can just OUTPUT the original GUID. Of course, the MERGE introduces it's own problems.

    Drew

    I'm not...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Maintaining Sequence of OUTPUT rows during INSERT

    If you change your INSERT to a MERGE, then you can just OUTPUT the original GUID. Of course, the MERGE introduces it's own problems.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Coalesce Function dynamically

    Part of the problem is that you are conflating table properties with row properties. When you are using sys.tables and sys.columns, you are looking at table properties, but when...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: problem converting date on procedure.

    Sergiy (7/6/2016)


    It's actually another way around - it's you who did not provide any rationale for using CAST rather than CONVERT in any cases.

    Actually, I did provide my rationale, but...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    My fourth was busy. There was the Fun Badge Tour (dancing at various tourist attractions: the Gay Village, The Royal Ontario Museum, Toronto City Hall, Younge-Dundas Square, and Sugar...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    jasona.work (6/30/2016)


    So when September rolls around, I'm going to a convention in Toronto, Ontario (Canada,) FanExpo. It's a Comic book / movie / anime sort of convention, and they've...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Very Easy SQL JOIN - But weird result

    That's the way JOINs work. You get a record for every match; so if each of four records matches two records, you will get eight records. If you...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: problem converting date on procedure.

    Sergiy (6/29/2016)


    drew.allen (6/29/2016)


    Sergiy (6/28/2016)


    Your problem is here:

    ' where RequestDate >= ''' + CAST(@RequestDate as nvarchar(23)) + ''''

    1. Never use CAST is SQL, especially for date-time related data types.

    I disagree....

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: problem converting date on procedure.

    Sergiy (6/28/2016)


    Your problem is here:

    ' where RequestDate >= ''' + CAST(@RequestDate as nvarchar(23)) + ''''

    1. Never use CAST is SQL, especially for date-time related data types.

    I disagree. CAST...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Question about profiler

    Since you are on SQL 2012, you should start using extended events. Using Profiler for traces has been deprecated.

    First, you probably are not capturing all events, and you probably...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 2,536 through 2,550 (of 4,085 total)