Forum Replies Created

Viewing 15 posts - 961 through 975 (of 3,957 total)

  • RE: Need help with the query.........

    ChrisM@Work (1/2/2014)


    ... for now we've got a rusty car wheel, a piece of lime green chalk and a small fish!

    No small fish allowed.

  • RE: extracting dates from string(long text)

    Luis Cazares (1/2/2014)


    This code is a modification from Dwain Camps' Pattern-based splitter.

    First of all, let's give credit where credit is due. That fast code came out of Chris Morris...

  • RE: The new Analytic functions in SQL Server 2012

    WayneS (1/2/2014)


    Hi Dwain,

    Thanks for your kind remark. And thanks again for responding to these questions.

    You're welcome. I was hoping you wouldn't mind too much if I had your back...

  • RE: Difference Between Maximum and Minumum Values

    I believe that this may be an alternate solution.

    SELECT Name

    ,[MAX(starttime)]=MAX(CASE WHEN rn = c THEN starttime END)

    ,[MIN(STARTTIME)]=MIN(CASE WHEN rn = 1 THEN...

  • RE: The new Analytic functions in SQL Server 2012

    j-1064772 (1/19/2012)


    How do the newfangled Analytics functions compare with the Quirky Update method used for - among other things - creating running totals in term of performance ?

    I haven't tested...

  • RE: The new Analytic functions in SQL Server 2012

    First of all Wayne, this is a great primer on using the new SQL 2012 analytic functions, and I know I for one will be referring folks to it if...

  • RE: Document The Code Please !

    homebrew01 (12/26/2013)


    Just a General Request.

    When giving a helpful reply, throw in a few comments to explain some of the less obvious SQL statements. It can make a world of...

  • RE: Return random records in a table-valued function?

    ChrisM@home (1/1/2014)


    Different route, similar results.

    First some sample data:

    SELECT TOP (50000)

    ID = ROW_NUMBER() OVER (ORDER BY (SELECT NULL)),

    [Version] = 'CTCAE v4.03 (MedDRAv12.0)',

    Grade = 1+ABS(CHECKSUM(NEWID()))%5

    INTO Data

    FROM SYSCOLUMNS a, SYSCOLUMNS...

  • RE: Need help to split Data

    Jeff Moden (1/1/2014)


    Sean Lange (12/20/2013)


    Last name is "Camps" so possessive would be Camps' 😀

    Doh!!! Sorry about getting your name wrong. :blush:

    Dwain must have been "camping out" just waiting for you...

  • RE: Are the posted questions getting worse?

    ChrisM@Work (12/31/2013)


    Stefan Krzywicki (12/30/2013)


    wolfkillj (12/30/2013)


    Stefan Krzywicki (12/30/2013)


    wolfkillj (12/30/2013)


    GilaMonster (12/30/2013)


    wolfkillj (12/30/2013)


    is there really a performance problem or are you just "tuning" the query as a knee-jerk response to seeing a scan...

  • RE: Are the posted questions getting worse?

    I hate to be the bearer of bad tidings during this holiday season, but this just came to my attention this morning.

    Steven Willis, whom some of you may know by...

  • RE: How to Compare Rows within Partitioned Sets to Find Overlapping Dates

    And here is (I think) another way to do it in SQL 2005 that avoids the self-join:

    SELECT ScheduleID, PersonID, startDate, durationDays

    ,row2StartDate, CalculatedEndDate, datedifference

    ...

  • RE: How to Compare Rows within Partitioned Sets to Find Overlapping Dates

    SQL 2012 makes pretty short work of this type of problem:

    WITH PartitionedSchedules AS

    (

    SELECT ScheduleID, PersonID, startDate, durationDays

    ,CalculatedEndDate=DATEADD(day, durationDays,...

  • RE: Sum of Counts

    sharonsql2013 (12/24/2013)


    No worried .. I figured it out:)

    Its

    Sum (case .... then 1 else 0)

    I think you meant:

    Sum (case .... then 1 else 0 end)

    If you're counting, it might be...

  • RE: Merge SQL Query help....

    rocky_498 (12/24/2013)


    Yes DOB in my DB is DATETIME, In my sample data i created, i am using varchar for DOB. I will change it to datetime for DOB....

    Why do you...

Viewing 15 posts - 961 through 975 (of 3,957 total)