arithmetic overflow error converting expression to data type int

  • For some reason this works fine running in SSMS, but it errors out in SRS. I tried seaching for this error in SRS but cant find any so maybe the problem lies within my sql script.

    Sample Data:

    counttt

    2220200522644

    2458148207990

    2925122975393

    2531158154358

    2751289282733

    2551150895797

    2343105785311

    2456170905502

    2936115817884

    293597409036

    258985435893

    2637138613075

    2220306054596

    2458216572519

    2925195993793

    2531206860068

    2751260299130

    2551251093795

    2343484516072

    2456341054275

    2936230032833

    2935103455775

    2589171094943

    2637160714474

    22201225994714

    24581482711906

    29251460715177

    25311439191515

    27511788653623

    25511529278543

    23431772340450

    24562002725478

    29361527589861

    29351110706914

    25891146794351

    26371409106209

    Field tt is data type bigint. Here is my script

    select cast((tt / count) as decimal) / 60 / 60 / 24

    I tried replacing decimal with money, float, and real but SRS still return same error.

  • nm figured it out

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

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