Viewing 15 posts - 1,216 through 1,230 (of 1,472 total)
What you have right now is an attempt at a correlated subquery. You don't want that. What you want that to be is a derived table.
October 30, 2008 at 6:42 am
Not that you asked me... but 😀
IMO, *just about* any solution involving a loop(or a correlated subquery or a few other things) is not set based. Now, yours might...
October 30, 2008 at 6:31 am
The reason it worked when you commented out the WHERE clause is because the WHERE clause is the whole problem in the first place. Putting criteria in your WHERE...
October 29, 2008 at 10:35 pm
Open up profiler and begin a new trace. In the filters, add the exact name of one of your functions with % signs on each side of it. ...
October 29, 2008 at 5:30 pm
From first glance, it looks like you might be running into one of the same issues I did... in that you can't use this method(or at least my experimentation with...
October 29, 2008 at 5:06 pm
You still haven't posted the sample data / DDL I requested in any easily usable format (see the link in my signature if you don't know what that means... and...
October 29, 2008 at 4:36 pm
Without writing any SQL as explanation, I can only be general about what you can try to do (there will be several methods of tackling this issue, this is only...
October 29, 2008 at 10:40 am
The answer is 42.
If that doesn't help you, post some DDL / Sample Data / Expected Results and how you want to manipulate your data to get there.
Also, having everything...
October 29, 2008 at 8:00 am
Although, the only thing I'm also concerned about is the data that has concentrated duplicates like the example below which would affect performance more I guess.
Due to the nature of...
October 29, 2008 at 6:10 am
[font="Courier New"]SELECT
ISNULL(source,'total') Source,
SUM(CASE WHEN status = 'out' THEN 1 ELSE 0 END) AS out,
SUM(CASE WHEN status = 'in' THEN 1 ELSE 0 END) AS [in],
SUM(CASE...
October 28, 2008 at 11:30 pm
Greg Snidow (10/28/2008)
October 28, 2008 at 11:17 pm
Greg,
A couple things. The first question is, how important is this data? I normally try to avoid this type of manipulation, as you are just about...
October 28, 2008 at 7:06 pm
Ok. For anyone who is reading this thread who is still somewhat confused on how this works, I'm going to attempt to break it down the way I understand...
October 28, 2008 at 3:36 pm
Oooh. Do me! Do me! (New solution a few posts back.) Despite the cursor, I'd wager that it'd run *fairly* quick. Unless I screwed something...
October 28, 2008 at 1:35 pm
It looks like if the number of rows retrieved in RateCount is 0 it returns NULL. Is it possible to have the query return "0" if this is the case?
I...
October 28, 2008 at 12:35 pm
Viewing 15 posts - 1,216 through 1,230 (of 1,472 total)