Hi
I have a report that as been working fine until today. I am getting the below when running the report. I presumed someone had entered bad figures somewhere in the files but cannot find anything. Is there anything in the syntax I can put in that will allow the zero in the calculation. I...
No problem, it is probably my bad View which as caused this. I will step back a bit and try and get the base figures working first, then probably apply your Pivot in some way in the end. Thanks for the patience with this and assistance.
Running that I get this result All packs relate to the ProductCode
And the View as this query
SELECT dbo.Product.ProductCode, dbo.ProductPackDetail.Length, COUNT(dbo.ProductPack.PackID) AS Packs, dbo.ProductPack.PackStatus, dbo.Product.Deleted
FROM dbo.ProductPackDetail...
Hi Chris
Firstly thank you for your patience and help.
I get a result now but it is the same result as we had before it is summing if the pact status as more than one length, I am not interested in the Pack inofrmation but just the sum of each length. Below is a snap shot of our Pack screen...
Yes looks like STRIN_AGG is simpler.
Mmm I am getting this now
Msg 105, Level 15, State 1, Line 6
Unclosed quotation mark after the character string '5.100000)
Thanks Chris, I ran the query and I am getting 'STRING_AGG' is not a recognized built-in function name.
I am on Microsoft SQL Server 2016 so I think the 'STRING_AGG' came in on later versions, any ideas what it was before?
Thanks
Hi
Sorry to have caused any confusion, there are more lengths than I first understood of the situation, however even if I break it down to the original post for this
,SUM([3.0]) AS [3.0]
I still get a result of 2 and not 1. I was asked for more information which is what I tried to do. Not...
Hi
Ok close but I encountered another issue when looking at the results
The 148-vwproductfreeCP View feeds off the below query which is called 148-vwproductfreefeedCP
SELECT dbo.Product.ProductCode, dbo.ProductPackDetail.Length, COUNT(dbo.ProductPack.PackID) AS Packs...
Hi
I have a query that I want to display all results into one row
The query currently returns the following
But I want it to display the figures in one row for Status as Free and one row as Status Allocated with the Total being the total of all the row. I have tried group by and other...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.