Viewing 15 posts - 2,656 through 2,670 (of 5,502 total)
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
How about
SELECT your_statement1
UNION ALL
SELECT your_statement2
?
Side note: you don't really need to store it in two temp tables before the UNION operation (as long as you don't need those separate...
October 22, 2010 at 2:36 pm
ALZDBA (10/22/2010)
Jeff Moden (10/21/2010)
ALZDBA (10/20/2010)
Dito.And it only serves a single purpose. i.e. strict hierarchy.
Ever tried building a family tree ?
Thanks for the input, Johan. Heh... from what I've seen,...
October 22, 2010 at 9:03 am
Viewing 15 posts - 2,656 through 2,670 (of 5,502 total)