Viewing 15 posts - 2,656 through 2,670 (of 5,504 total)
You should look into WITH ROLLUP (see BOL for details) to get your total value instead of using the UNION.
October 30, 2010 at 6:21 am
It's easy, but complicated 😉
SQL Server will evaluate each expression within your equation and will determine the returned data type. Based on that it will define each subresult as well...
October 29, 2010 at 3:29 pm
SUM() is an aggregate function.
You need to group your data by using GROUP BY in your query. Please have a look at BOL (BooksOnLine, the SQL Server help system usually...
October 29, 2010 at 3:13 pm
I guess what Chris refers to is the FOR XML PATH() concept.
You might find a suitable solution by searching for "string concatenate for xml path" on either this forum or...
October 29, 2010 at 3:09 pm
Are you sure you're using SQL Server 2008????
The ORA-... error number indicates something different....
October 26, 2010 at 11:30 am
I would load the Donation Amount file (maybe the Donation Maker, too) into staging tables first and move into the final table from there. This would allow for any logic...
October 26, 2010 at 5:16 am
steve-760524 (10/25/2010)
October 25, 2010 at 4:13 pm
You still haven't provided any of the error messages you mentioned. Please post those errors.
October 25, 2010 at 12:54 pm
First of all: EXCELLENT job providing ready to use sample data, your current solution, current result and expected result. Nothing more to ask for!! THANK YOU!!
I stopped using PIVOT a...
October 25, 2010 at 12:37 pm
What are the error messages you get? The query itself looks fine...
There can be anything like permission issues, mis-spelled table or column name, data type conflict, foreign key references -...
October 25, 2010 at 12:15 pm
Toms solution will work if you need to get the image names into one column.
But if you need to do a pivot (or cross tab) with separate columns per picture...
October 25, 2010 at 12:09 pm
Hmmm...
I've re-run your code and get the same results now.
Must have been a problem with my system back then - either the part behind the screen or in front if...
October 25, 2010 at 10:39 am
Ok, here's a slightly different approach.
When running your second sample, I didn't get yuor expected result. Is that intentional?
If not, here's a query that will return your expected result and...
October 22, 2010 at 3:11 pm
I hope this link will show you some ways to do it...
October 22, 2010 at 2:51 pm
Viewing 15 posts - 2,656 through 2,670 (of 5,504 total)