Trouble formatting data from table.

  • potentially something similar to this

    select customerid
    , max(case when [Data Entry] = 'entry' then [Data Entry] else null end) as [Data Entry]
    , [Entry Number]
    , max(case when [Data Entry] = 'entry' then ReportDate else null end) as ReportDate
    .. repeat for "task"
    from tablename
    group by CustomerID
    , [Entry Number]
  • What is the association between an Entry and a Task?  It is obviously not the entry number - nor does it appear to be related to the report date...but there must be some relationship.

    How do you identify that the task with entry number 2 with a report date of 13-March is associated with the entry with an entry number of 2 and a report date of 19-March.

    How do you identify that the task with the entry number 3 with a report date of 24-April is associated to the entry with the entry number 4 with a report date of 16-April?

    And why is the entry with entry number 3 not associated with the task with entry number 3?

    The logic doesn't seem to match up...

     

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 2 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply