Display data in a own column

  • As you can see in the image I have Prop 47 Reduction to Misdemeanor = YES and Resentencing Date = 05/05/2015. I need to figure out how to move the Resentencing Date data in its own column, so it will display one line instead of two.

    SELECT DISTINCT

    OffenderInfo.Pin,

    OffenderInfo.FullName,

    OffenderInfo.OffenderType,

    AttributeDef.Description, ChargeAttribute.Value

    FROM

    OffenderInfo INNER JOIN CaseInfo ON OffenderInfo.Id = CaseInfo.OffenderId INNER JOIN Charge INNER JOIN CaseCharge ON Charge.Id = CaseCharge.ChargeId INNER JOIN ChargeAttribute ON Charge.Id = ChargeAttribute.ChargeId INNER JOIN AttributeDef ON ChargeAttribute.AttributeId = AttributeDef.Id ON CaseInfo.Id = CaseCharge.CaseId

    WHERE

    (OffenderInfo.Pin = '100023764') AND (OffenderInfo.OffenderType = 'Adult') and AttributeDef.Description in ('Prop 47 Reduction to Misdemeanor','Resentencing Date')

    Pin_________FullName____OffenderType__Description_________________Value

    100023764___Test, Al 'test'__Adult__Prop 47 Reduction to Misdemeanor__Yes

    100023764___Test, Al 'test'__Adult__Resentencing Date______________05/05/2015

  • can you post ddl the the four listed tables in appropriate data inserts for each?

    Don Simpson



    I'm not sure about Heisenberg.

  • Sorry, Not sure what you mean by ddl?

  • Uncle Buck (5/6/2015)


    Sorry, Not sure what you mean by ddl?

    CREATE TABLE statement.

    DDL is a TLA for Data Definition Language.

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

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