Forum Replies Created

Viewing 15 posts - 2,686 through 2,700 (of 10,144 total)

  • RE: Are the posted questions getting worse?

    Grant Fritchey (1/26/2015)


    ChrisM@Work (1/26/2015)


    Grant Fritchey (1/26/2015)


    ChrisM@Work (1/26/2015)


    Your wish etc etc PM me if you're sure and we'll fix it up.

    Thanks! But I've already spent the money to build the other...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (1/26/2015)


    ChrisM@Work (1/26/2015)


    Your wish etc etc PM me if you're sure and we'll fix it up.

    Thanks! But I've already spent the money to build the other costume. Might as...

  • RE: Are the posted questions getting worse?

    rodjkidd (1/26/2015)


    Chris,

    Are well it would be good to see you there!

    Bracknell - no, I ended at the end of the year. Had a couple of weeks R&R and now looking...

  • RE: Group By (Grouping with Non Aggregrate)

    Most folks would recommend you use your display application for this:

    SELECT

    LP = CASE WHEN RN = 1 THEN LP ELSE '' END,

    KW

    FROM (

    SELECT LP, KW, rn = ROW_NUMBER()...

  • RE: Are the posted questions getting worse?

    rodjkidd (1/26/2015)


    ChrisM@Work (1/26/2015)


    Grant Fritchey (1/26/2015)


    ChrisM@Work (1/26/2015)


    GilaMonster (1/23/2015)


    Luis Cazares (1/22/2015)


    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with...

  • RE: Are the posted questions getting worse?

    Grant Fritchey (1/26/2015)


    ChrisM@Work (1/26/2015)


    GilaMonster (1/23/2015)


    Luis Cazares (1/22/2015)


    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme...

  • RE: Are the posted questions getting worse?

    GilaMonster (1/23/2015)


    Luis Cazares (1/22/2015)


    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme of superheroes for...

  • RE: All Monday date of each month.

    Thanks Cadavre 😀

  • RE: All Monday date of each month.

    SELECT MondaysThisMonth = DATEADD(DAY,n,MondayBeforeFOM)

    FROM (

    SELECT FirstOfMonth, MondayBeforeFOM = DATEADD(DAY,DATEDIFF(DAY,0,FirstOfMonth)/7*7,0)

    FROM (SELECT FirstOfMonth = DATEADD(MONTH,DATEDIFF(MONTH,0,GETDATE()),0)) d

    ) e

    CROSS JOIN (SELECT 7 UNION ALL SELECT 14 UNION ALL SELECT 21 UNION ALL SELECT 28...

  • RE: Calculate Power - Most Advanced UOC

    This is a scalar function. Is it accurate to describe it as "most advanced"?

  • RE: How to repeat the same row combination?

    srinivas.akyana (1/23/2015)


    Hello ChrisM@Work,

    Since I wanted to repeat the original combination 4 times prior for MonthIDs of 307 & 309, I would need to first start with latest month which is...

  • RE: How to repeat the same row combination?

    Your original table shows RSCID of 3542 associated with MonthID of 309. In the expected results table, rows with RSCID of 3542 (original month 309) are coloured both green and...

  • RE: Remove Duplicates in opposite columns

    keith.west-982594 (1/22/2015)


    This solution worked perfectly. Thanks for your help. I definitely need to study the CROSS APPLY feature more.

    You're welcome. You don't have to use APPLY:

    WITH Swapper AS...

  • RE: Remove Duplicates in opposite columns

    SELECT

    LinkingID,

    ID1,

    ID2,

    rn = ROW_NUMBER() OVER (PARTITION BY LinkingID, IDMAX, IDMIN ORDER BY (SELECT NULL))

    FROM #Sample s

    CROSS APPLY (

    SELECT

    IDMAX = CASE WHEN ID1 > ID2 THEN...

  • RE: Recursive data but increasing date by one day

    steve.tarry (1/21/2015)


    Recursive Date

    DECLARE @STARTDATE DATE = getdate();

    DECLARE @ENDDATE DATE = '2015-03-21';

    WITH DateCTE AS (

    SELECT@startdate AS...

Viewing 15 posts - 2,686 through 2,700 (of 10,144 total)