Insert, case when …etc. | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Insert, case when …etc.

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
use where clause
Thank you very much. Lubo
]]>