SELECT [Branch], SUM(qty) as TotalQty
FROM (
SELECT
LEFT([Desc] + ' ',charindex(' ', [Desc], 1)) AS [Branch], [DESC], qty
FROM ARD1
WHERE DATE BETWEEN '2013-12-01' AND '2013-12-31' ) AS X
GROUP BY [Branch]
ORDER BY [Branch]
I have here a query that is giving me the results I need the only problem there is, is that I may need to search for this branch anywhere in the description not just in the beginning is there a way to do that?
Debra has a question