Viewing 15 posts - 16 through 30 (of 127 total)
I knew I couldn't do it in the GROUP BY, but I don't know why it's not allowed in the WHERE. And, I knew I could do it by...
December 27, 2007 at 7:08 am
Don't really know. The BOL says that in the absence of a GROUP BY, the HAVING acts as a WHERE. Doesn't in practice, though. I just thought...
December 24, 2007 at 10:26 am
Thanks for your reply, Tomm. But you seem to be missing the point of the GROUP BY -- the idea is if I have, say 5 topics, I want...
August 3, 2007 at 8:51 am
Can you post a sample ddl with some data?
August 2, 2007 at 6:30 am
Aaron, that's an interesting approach. Basically, you're appending the data you want to use to the end of the field you're sorting on. Once sorted, you simply break...
August 2, 2007 at 5:28 am
It's interesting you did not point out the possibility of a "double unknown" of using this method. That is, it's possible for the error field to be either 0...
July 13, 2007 at 9:29 am
You're right; I found how to do that. However, is there any way to do the thing in my example -- introspectively get data from the table at...
July 12, 2007 at 12:40 pm
Yes, it is sort of recursive. In the example, every new row will have the number of rows currently in the database (might go up, might go down). ...
July 11, 2007 at 1:23 pm
Basically, what I said was it's historic data and I can't delete it. The only thing it has in common is that, for a given key, each line updates...
June 11, 2007 at 12:29 pm
well, I had a nice long reply... but the forum ate it.
June 11, 2007 at 10:14 am
What's the nature of your input?
May 24, 2007 at 11:01 am
As a test, I refactored the CTE as a variable, and it close to doubled the execution time.
Is there a way to use a CTE to create another CTE?
May 23, 2007 at 7:05 am
Alright, try this:
DECLARE @data TABLE( lname VARCHAR(40) ,fname VARCHAR(40) ,val INT ,perf DECIMAL(9,4) ,retrn DECIMAL(9,4) ) INSERT @data VALUES('Jones','Adam',55,1.234,2.023) INSERT @data VALUES('Jones','Adam',56,2.235,-0.321) INSERT @data VALUES('Jones','Adam',57,0.034,3.232) INSERT @data VALUES('Jones','Adam',58,-0.989,6.444) INSERT @data VALUES('Jones','Adam',59,3.334,-1.822) INSERT @data VALUES('Smith','Benny',56,4.004,1.923) INSERT @data VALUES('Smith','Benny',58,2.031,2.176) INSERT @data VALUES('Smith','Benny',59,-0.003,1.332) INSERT @data VALUES('Tyler','Tom',55,0.002,0.012) INSERT...
May 23, 2007 at 6:53 am
Can you post a ddl & sample data?
May 22, 2007 at 2:04 pm
Viewing 15 posts - 16 through 30 (of 127 total)