On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.
SUM(CONVERT(MONEY, CASE WHEN ( ord_date BETWEEN @WkStartDate AND @WkEndDate ) THEN ( DATA.total_qty * DATA.price * DATA.co_rate ) ELSE ( 0 ) END)) AS [Wk_TY_Sales] ,
SUM(CONVERT(MONEY, ( CASE WHEN ( ord_date BETWEEN @WkStartDate AND @WkEndDate AND DATA.line_status = 'I' ) -- CONDITIONAL THEN ( DATA.total_qty * DATA.price - ( DATA.total_qty * DATA.price ) * ( ISNULL(zzxdiscr.disc_perc, 0) / 100 ) ) ELSE ( 0 ) END ) * DATA.co_rate)) AS [Wk TY Unit Sales]
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|T-SQL: Wrong Result||7||39|
|get count of orders by customer Sql Server table.||3||48|
|Populate fields in group based on first record in group||4||16|
|SQL - Subquery in WHERE section||4||34|
Join the community of 500,000 technology professionals and ask your questions.