Forum Replies Created

Viewing 15 posts - 1,426 through 1,440 (of 4,085 total)

  • RE: Getting an id from rows with the most recent dates

    SqlServerCampbell - Tuesday, December 19, 2017 2:07 PM

    Got it.  I was making it more complicated than it needed to be.  The...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Rebuilding a table

    I was thinking that for most purposes, an explicit transaction would suffice.


    BEGIN TRAN

    DELETE statement

    INSERT statement

    COMMIT TRAN

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Distinct of two columns?

    tacy.highland - Tuesday, December 19, 2017 9:43 AM

    Drew.allen - I think that might be it!

    I dumped the CASE data into a temp...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SQL XML - Font colour in a case statement

    You've been around long enough to know to provide sample data and expected results.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help with aggregate function

    ger_serrano - Tuesday, December 19, 2017 8:39 AM

    Really sorry but business keep changing the requirements. My table is:
    create table SampleData ( col1...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Row count differences with CTE vs Temp table Vs view

    aaron.reese - Tuesday, December 19, 2017 7:35 AM

    Sorry Drew

    What I meant was that using UNION ALL could result in duplicate rows which...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to calculate finacial year in mssql 2000

    HappyGeek - Monday, December 18, 2017 11:26 PM

    raghuldrag - Monday, December 18, 2017 9:22 PM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to calculate finacial year in mssql 2000

    raghuldrag - Monday, December 18, 2017 9:12 PM

    drew.allen - Monday, December 18, 2017 1:19 PM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Distinct of two columns?

    Isn't it as simple as a CASE expression?

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to calculate finacial year in mssql 2000

    First, when working with dates, store them as dates.  Part of the reason that you're having problems is...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Replace TABLE with STAGING_TABLE. Approach?

    ZZartin - Monday, December 18, 2017 6:30 AM

    Is there any reason not to just use sp_rename to do this?  Keep both copies...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to select count based on two columns combination

    You just use both columns in your PARTITION BY clause.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Islands and Gaps Question

    Joe Torre - Friday, December 15, 2017 1:07 PM

    take a look at this

    This article depends on data where the records...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Islands and Gaps Question

    J Livingston SQL - Friday, December 15, 2017 1:01 PM

    autoexcrement - Friday, December 15, 2017 12:46 PM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Islands and Gaps Question

    It requires two different ROW_NUMBER()s.

    ;
    WITH StatusGroups AS
    (
        SELECT *
        ,    Grp = ROW_NUMBER() OVER(PARTITION BY EID ORDER BY StartDate, Stat) - ROW_NUMBER() OVER(PARTITION BY EID,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • Viewing 15 posts - 1,426 through 1,440 (of 4,085 total)