Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 4,085 total)

  • RE: Parsing data

    I've updated the staging table definition.  I used a temp table here, but you should use your regular table.

    CREATE TABLE #table(
        id INT IDENTITY,
       ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Table entry appears multiple times

    NikosV - Friday, August 10, 2018 7:54 AM

    No problem Drew. After some fiddling I saw that too but couldn.t make it work.
    Any...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Parsing data

    There is a third option if you can add an identity column to your staging table.  Is that possible?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Table entry appears multiple times

    NikosV - Thursday, August 9, 2018 11:46 PM

    I've seen ROW_NUMBER and I'm pretty sure this is the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Color alternate column group in matrix

    Please don't post in multiple forums.  It fragments the discussion.

    Please post all responses here.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Splitting a comma separated string in one field and populate several fields

    Eirikur Eiriksson - Wednesday, August 8, 2018 11:36 PM

    Since you are posting on the SQL Server 2012 forum, you may want to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to GROUP BY in one condition and simply SELECT in another in one go?

    It's hard to tell on such a small sample, but using GROUPING SETS might actually perform better.

    WITH payments AS
    (SELECT 100.00 AS Ex_VAT,
            20.00 AS...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Converting decimals to HH:MM:SS

    Ken McKelvey - Thursday, August 9, 2018 7:16 AM


    DECLARE @t decimal(10,2) = 3.25;
    SELECT CONVERT(char(8), DATEADD(second, @t%1 * 60, DATEADD(minute, @t, 0)),...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Count the amount of times values appear in the database

    paul 69259 - Wednesday, August 8, 2018 9:19 AM

    Hmmm, it doesn't seem to like me using the square brackets when I'm doing...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: tSQLt AssertEqualsString

    leeholden - Wednesday, August 8, 2018 1:18 PM

    The collation is Latin1_General_CI_AS, but I've created a function that camel cases the input, so...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: tSQLt AssertEqualsString

    Use a case sensitive collation in your test.  It's simple enough that you really don't need a stored procedure.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Execute same SELECT with a different condition

    I think that a cross tab might perform better here, especially since you're already doing aggregates on the data.  I used a CROSS APPLY instead of writing essentially the same...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: formatting T-SQL

    Eric M Russell - Wednesday, August 8, 2018 8:07 AM

    I'm talking about code reviews by the DBA.

    It doesn't matter.  It's still...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Trying to find the minimum date for 1st fuel and non fuel transaction

    Also, we asked for sample data and expected results.  You've only provided the first half of that.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: formatting T-SQL

    Eric M Russell - Wednesday, August 8, 2018 7:12 AM

    Code reviews are great, but depending on the volume and velocity of development,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 1,036 through 1,050 (of 4,085 total)