Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: Query Help

    I think you can use below query

    SELECT REFERENCE_ID

    ,TECH_MODE_ID

    ,MIN(BEGIN_TIME)

    ,MAX(END_TIME)

    FROM SAMPLE

    GROUP BY

    REFERENCE_ID

    ,TECH_MODE_ID

    ,CONVERT(VARCHAR(20), BEGIN_TIME, 100)

  • RE: ssis expression - set a variable based on value of another variable

    your statement seems incorrect, find below corrected

    @[User::FeedType] == "FullFile" ? @[User::pNeedPorSessions] = 6 : @[User::pNeedPorSessions] = 1

  • RE: How to count Multiple columns

    Hi Teee, you can either use my Query from prev post to avoid inner statement OR

    You can use Daniel's Query replace & with + that works perfectly.

    Sorry Daniel -...

  • RE: How to count Multiple columns

    You can use below to avoid inner query.

    Select intRequisitionId,

    SUM(CASE WHEN ISNULL(dteFirstApproverDateNotified,0) <> 0 THEN 1 ELSE 0 END ) +

    SUM(CASE WHEN ISNULL(dteSecondApproverDateNotified,0) <> 0 THEN 1 ELSE 0 END...

  • RE: How to count Multiple columns

    Daniel your statement doesn't work because in case statement it only takes 1 value as output eventhough it matches the rest.

  • RE: How to count Multiple columns

    I think Cadavre has given the right tip for you.

    That should work.

    🙂

  • RE: How to count Multiple columns

    I think from your query i understood that you need the count of each column. See below query that gives total count. I can't run on my DB since i...

Viewing 7 posts - 1 through 7 (of 7 total)