Viewing 15 posts - 1 through 15 (of 43 total)
OK, maybe try to ask the question another way. Is 10GB (8%) of available free space OK / acceptable?
February 27, 2014 at 6:51 am
Well, I am not even close to a SQL server expert... trying to learn. Our SQL guy is out and we have been having problems with our one database...
February 27, 2014 at 6:30 am
Ha, you are correct. I just ended up keeping the previous as is and created all new. And entire switchboard of different results. However, this is awesome....
February 9, 2013 at 2:33 pm
Here is the last complete I was working with:
WITH SampleData ([Group], [Type], Amount) AS (
SELECT 'Dog', 'Typea', 1 UNION ALL
...
February 8, 2013 at 9:22 am
I need to figure out one last solution with this. Is it possible to do the PIVOT SQL function with this solution?
(http://blogs.msdn.com/b/spike/archive/2009/03/03/pivot-tables-in-sql-server-a-simple-sample.aspx)
such as:
Group as the rows (Dog,...
February 8, 2013 at 9:18 am
Thank you!! I will try this too.
February 8, 2013 at 3:12 am
Perfect... so far so good. Now just to test to make sure all of my numbers are coming out correct. Thank you again! This site is awesome!
February 7, 2013 at 9:59 am
OK, I was closer.
Also, I applied this to my live query and I got this error:
Divide by zero error encountered.
February 7, 2013 at 9:18 am
Got it!!!!!!!!
WITH SampleData ([Group], [Type], Amount) AS (
SELECT 'Dog', 'Typea', 1 UNION ALL
SELECT 'Dog', 'Typeb', 2 UNION ALL
SELECT 'Dog', 'Typec', 3 UNION ALL
SELECT 'Cat', 'Typea', 10 UNION ALL
SELECT...
February 7, 2013 at 8:58 am
ChrisM@Work (2/7/2013)
Aggregate Amount by Group and type, then feed the result into Sean's original query.
That is where I was stuck before. How would I change this?
SELECT
[Group],
[Type],
Amount,...
February 7, 2013 at 8:47 am
WITH SampleData ([Group], [Type], Amount) AS (
SELECT 'Dog', 'Typea', 1 UNION ALL
SELECT 'Dog', 'Typeb', 2 UNION ALL
SELECT 'Dog', 'Typec', 3 UNION ALL
SELECT 'Cat', 'Typea', 10 UNION ALL
SELECT 'Cat', 'Typea', 10...
February 7, 2013 at 8:37 am
These all are working great except that I forgot the first step... I need to SUM the values first. So if I have multiple group / types... I don't...
February 7, 2013 at 8:28 am
This is working great too. What if I add multiple types per animal in first. How do I group and total first and then get the same unique...
February 7, 2013 at 8:17 am
Also how did you get the code highlighted above?
February 7, 2013 at 8:11 am
Viewing 15 posts - 1 through 15 (of 43 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy