I have this 2 queries which I want to integrate together. But I tried a lot but I don't get the same result or it takes lot and timeout's. So I am thinking to run the query separately and then integrate them together. can somebody help me achieve this. I am using mssql 2008.
I want to show the sum_AvailQty col in the productsale query result
My 2 queries I have attached.