Viewing 15 posts - 16 through 30 (of 32 total)
You're welcome.
Yes, to use the code I gave you, you need to create a table first to Insert Into. Here's the SQL to do this:
USE InsertYourDBNameHere;
IF OBJECT_ID('GRANDTOTAL') IS NOT...
February 19, 2009 at 11:23 am
insert into grandtotal
select
(select sum(bocleared) from bocleared),
(select sum(ctcleared) from ctcleared),
(select sum(nhcleared) from nhcleared),
(select sum(totalcleared) from totalcleared)
I would think something along those lines would do the trick ...
BTW, I wouldn't use the...
February 17, 2009 at 4:01 pm
The way it looks to me, you should only be expecting to get a Count of 1 returned by your 'aggregate of aggregate' query. This is because all Count...
February 17, 2009 at 2:46 pm
Max, I don't think it's possible for the query engine to 'know' what 'only the rows returned by the join' are ... considering that the comparison in question is a...
February 17, 2009 at 2:15 pm
What every one else said, and also ...
Why are you even trying to use a SUM ... when you're only looking at one row?
February 13, 2009 at 1:00 pm
I did a little googling, and it kinda looks like you have to grab this info outside of SQL Server, either through the cmdshell command (generally inadvisable to enable this...
February 13, 2009 at 12:49 pm
Ah, if only things like this, that SEEM simple, actually WERE simple.
Having had to build databases to track this kind of data, I'll just throw out a few things to...
February 11, 2009 at 12:08 pm
The short answer is ... neither of the ways you're describing ... is the right way.
You're right, you wouldn't put a whole bunch of fields that are 'potential' foreign keys...
February 5, 2009 at 11:34 am
I tried your isnull method on a table I have on my server, and when I pass in all NULL parameters, I get no rows returned. I would think...
February 4, 2009 at 1:53 pm
I can't speak to the 'performance issue' someone raised above, but I can tell you this ... I use the method described all the time, and it does do exactly...
February 4, 2009 at 12:08 pm
There's no question that using IN is the wrong option.
However, the choice between left outer join and the not exists clause appears a bit less 'cut and dry', IMHO. ...
February 3, 2009 at 5:48 pm
Shouldn't you finish building the entire 'new' unicode string before you fire the update statement? The way it looks to me, you're trying to update the field [the] over...
February 2, 2009 at 4:22 pm
Thanks for the help, guys.
So I guess the next logical question is this ... *should* every 'question' that gets pulled by the query in the SP be given a RANK...
February 2, 2009 at 11:27 am
Alright, I decided to invest a bit more time, and took a closer look at the execution plan for you. I'm about 99% sure the problem lies somewhere in...
January 29, 2009 at 4:00 pm
I'm sorry I don't have a lot of time to look into this for you, but at first blush:
This was obviously built by a some kind of query builder, and...
January 29, 2009 at 2:51 pm
Viewing 15 posts - 16 through 30 (of 32 total)