Forum Replies Created

Viewing 5 posts - 31 through 35 (of 35 total)

  • RE: CASE WHEN

    So this will first look to see if the operator is '>', if it is then it will work out if the value is greater than the threshold and make...

  • RE: SUM Case When (decimal's!)

    I have worked it out! It was something to do with a later statement being CAST().

    Thanks everyone.

  • RE: SUM Case When (decimal's!)

    I have stripped some of the code out that is irrelevant but here is what its doing.

    IF OBJECT_ID('tempdb.dbo.##TempTable1', 'U') IS NOT NULL DROP TABLE ##TempTable1

    SELECT

    SUM(CASE WHEN [Measure] = 'XXX'...

  • RE: SUM Case When (decimal's!)

    Here is the design view of the audit table. I am putting the data into the value field.

  • RE: SQL Loop HELP!

    Thank you so much for this response! Worked perfectly and the first time I have used a cross join 🙂

Viewing 5 posts - 31 through 35 (of 35 total)