SQL Server Performance

Insert, case when ...etc.

Discussion in 'T-SQL Performance Tuning for Developers' started by luma, Aug 24, 2005.

  1. luma New Member

    Hello , can you help me please ?

    I have 3 tables :
    Hello , can you help me please ?

    I have 3 tables :

    Table Column

    LinksNS (varchar) , doNum (bigint) , hoNum (bigint)
    Detprice (decimal), v_Num (varchar)
    Sum_zl_In priceModif (decimal)

    I need sum values Det.price. BUt only in the case when

    some_convert (right(Det.v_NUm,9)) = >Links.doNUm
    AND
    some_convert (right(Det.v_NUm,9) < = hoNUm)

    group by NS

    and Insert to table Sum_zl_In.priceMOdif

    MAybe it isn't clear, but can you help me? I have tried write it very long , but i am not successful
    Many Thanks, Lubo

  2. dineshasanka Moderator

    use where clause
  3. luma New Member

    Thank you very much. Lubo

Share This Page