Forum Replies Created

Viewing 15 posts - 1 through 15 (of 22 total)

  • RE: Pivot or?

    Using the changes I am now getting a soted order but I have lost the PIVOT and below is all that is returned. I dug through line by line and...

  • RE: Pivot or?

    order comes through oddly but I think it's the _enddate or lack of data and a filter. Much appreciated and this gives me alot to ponder with on the sortOrder.

    ...

  • RE: Pivot or?

    Thank You! My sort order is not coming through is the issue that I am trying to fix. The CASE works but once in @Cols table it loses the sort.

    When...

  • RE: Pivot or?

    After the first select does the Order of the items stays the same in the Head?

    SELECT @ColsList = COALESCE(@ColsList + ',[', '[') + Head + ']'

    FROM @Cols...

  • RE: Pivot or?

    Thank You! I was p[laying with it late last night and realized the double tap there (insert) and felt pretty stupid asking an obvious question. Been staring at this for...

  • RE: Pivot or?

    ahh making sense, kind of like CASE which I am used to except this you got more control. I added everthing in and I keepgetting a syntax error unless I...

  • RE: Pivot or?

    One thing I am trying to figure out is how to put the results in a specific order

    SELECT @ColsList = COALESCE(@ColsList + ',[', '[') + Head + ']' ...

  • RE: Pivot or?

    This may help or muddy things up 🙂

    If [2Marketplace Product] = Wintel Pre Packaged Request for DSI/OVCM Packages(Desktops)

    Then this is the workflow

    WPS.PrePackageFileUpload.Auto

    WPS.PrePackageValidation

    WPS.UserConfirmation

    WPS.SystemCheck.Auto

    WPS.DeviationQA.Auto

    WPS.PrePackageQA.Auto

    WPS.AdvancedParameter.Auto

    WPS.PublishToDev.Auto

    WPS.PublishToUAT.Auto

    WPS.PrePackageUATApproval

    WPS.IntegrationTesting.Auto

    WPS.PublishToProd.Auto

    WPS.Prod Entitlement

    WPS.Notify.Auto

    which would breakdown to

    WPS.PrePackageFileUpload.Auto_StartDate --- Probably...

  • RE: Pivot or?

    Mike01 (5/12/2011)


    That's because of the Max(EndDate) that we are using in the pivot. You need to use an aggregate for the pivot function, so I used that field. ...

  • RE: Pivot or?

    LOL nope. But if you were female 😉

    The code I posted using the example data has dates missing and I cannot figure out why. I am thinking that the dates...

  • RE: Pivot or?

    here is the Full code

    DROP TABLE #t

    Create TABLE #t

    ([3Marketplace Order ID] [nvarchar](138) NULL,

    [1Request Item] [nvarchar](127) NULL,

    [2Marketplace Product] [nvarchar](138) NULL,

    [11Item Date Closed] [datetime] NULL,

    [10Date Due] [datetime] NULL

    )

    ...

  • RE: Pivot or?

    WOW!!! Do you need a room mate 🙂 Personal assistant 🙂 Been able to add more to it and it's pulling back 5 k pretty qucik, faster that my 1k...

  • RE: Pivot or?

    3Marketplace Order ID 2Marketplace Product wps.QA1Start wps.QA1Closed wps.QA2Start ...

  • RE: Pivot or?

    Wow! Never heard of CTE until now, Common Table Expressions, it worked on the example date fine. The only thing is that I need it inline with the closed like...

  • RE: Pivot or?

    After I posted I had a DUH moment. DUH is dynamic not static. The Order by worked fine and since I also setup a filter to use

    [2Marketplace Product] so they...

Viewing 15 posts - 1 through 15 (of 22 total)