Forum Replies Created

Viewing 15 posts - 2,011 through 2,025 (of 4,085 total)

  • RE: SSC Forum Updates

    Is there a way to get the Like/Share/Report buttons on the same line as the Reply/Multiquote buttons?

    I do like the preview down at the bottom.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Parsing XML: handling special characters: < " >

    vpolasa (1/11/2017)


    Please correct me if I'm wrong. Do I need to use RAW mode when using ELEMENTS XSINIL? In this case a new subelement is created. I might not need...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Parsing XML: handling special characters: < " >

    It's because you're converting your XML to VARCHAR(MAX), just leave it as XML and you shouldn't have these problems. The FOR XML directive treats text that looks like XML...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Return some rows in columns

    JJMEIJER (1/10/2017)


    My suggestion would be to use a PIVOT clause:

    WITH cteSports AS (

    SELECT * ,sn = ROW_NUMBER() OVER (PARTITION BY name ORDER BY sport)

    FROM #example

    )

    SELECT name,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: The data types varchar and xml are incompatible in the add operator.

    It helps if you specify what the error is when you get an error. I ran your code and did not receive an error. My best guess is...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: replace null with another column

    MMartin1 (1/10/2017)


    drew.allen (1/10/2017)


    MMartin1 (1/9/2017)


    You forgot the NOT.

    SELECT CASE WHEN NULL IS NOT NULL THEN NULL ELSE NULL END;

    How about

    SELECT CASE WHEN NULL IS NOT NULL THEN NOT NULL ELSE NULL...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: replace null with another column

    MMartin1 (1/9/2017)


    You forgot the NOT.

    SELECT CASE WHEN NULL IS NOT NULL THEN NULL ELSE NULL END;

    How about

    SELECT CASE WHEN NULL IS NOT NULL THEN NOT NULL ELSE NULL END

    ?

    same...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Date logic

    The problem is that the definition of "duplicate" here is not well defined. Specifically, you want to count times as duplicates if they fall within a specific threshold of...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Then by happenstance Trump

    Reported as spam.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: The White Leafs

    Reported as spam.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Renaming fields and combining them into one column

    CELKO (1/7/2017)


    I see absolutely no benefit to having this as a check constraint rather than as a foreign key constraint.

    The check constraint can be used by the optimizer immediately; it...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Can anyone come up with a better optimized query please?

    You do have a partial CROSS JOIN somewhere. Looking at the query plan, the hash match join has inputs with 297K and 907K rows, but the output is 129,682K...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Remove certain characters from a string

    I'm about to leave on vacation, so I don't have time to do a thorough write-up, but the general approach is to use a tally table to get a row...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Renaming fields and combining them into one column

    CELKO (1/5/2017)


    Having a new sport shouldn't require a DDL change. Getting a list of available sports shouldn't need to remove duplicates.

    I would make the argument that the list of...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Any tips on speeding this SQL up would be most helpful

    I've looked at this, and I have lots of questions. Specifically, it looks like a_site_id should be part of the primary key, but it is not used in any...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 2,011 through 2,025 (of 4,085 total)