locked
Wrong Output RRS feed

  • Question

  • User-797751191 posted

    Hi

      When i run below query 1 it gives different output what i get from Query2-Query3

    Query1

    select sum(T0.[DocTotal]) as T0 , sum(T1.[DocTotal]) as T1
    FROM test0 T0 , test1 T1

    Query2

    select sum(T0.[DocTotal]) from test0 t0

    Query3
    select sum(T1.[DocTotal]) from test1 t1

    Thanks

    Tuesday, November 26, 2019 7:23 AM

All replies

  • User753101303 posted

    Hi,

    Please avoid to ask the same question multipl:e times.

    I answered in you other thread, telling that FROM test0 T0 , test1 T1 matches each row from test0 with each row of test1 (whih likely gives the wrong result and is slower) as well as suggesting another approach to get your result using two columns if this is what you want.

    Edit: this is https://forums.asp.net/p/2161933/6286145.aspx?Query+Slow

    Tuesday, November 26, 2019 9:13 AM