Viewing 15 posts - 18,481 through 18,495 (of 18,923 total)
you could do something like this but I'm sure there's a faster way to return that query... this takes 30 secs to run on 30 groupings / 10k rows)... however...
March 1, 2005 at 10:16 am
You can test this script on the northwind db and see how long it runs... shouldn't take more than a few secs.
Also you could modify the foreach proc to run...
March 1, 2005 at 10:12 am
It's not dumb... but it's actually pretty hard to do.
I got this from microsoft but I lost the original link some time ago... this is my slightly modified version :...
March 1, 2005 at 10:00 am
then you'll have to scan the text everytime the user types a character and count how many lines there are... but that can cause problems if it's a realy...
March 1, 2005 at 9:48 am
You'll have to loop through the text and count how many vbCrlF are in it. You'll have to code this in the keypress or something like that... and start...
March 1, 2005 at 9:34 am
I'm not 100% sure about this. But from my experience it seems that all the expressions in the case must return the same datatype. So it's either all...
February 28, 2005 at 2:11 pm
Here's an exemple on how to filter out your select so you get all the data you need in only 1 select... but also no more data than you need.
SELECT...
February 28, 2005 at 9:05 am
I can think of 2 things :
1 - index are fragmented : you can run sp_updatestats to update the statistics of the table.
You should also look up DBCC INDEXDEFRAG...
February 28, 2005 at 8:45 am
Select C.cust_id, C.customer_email, COUNT(*) as PurchasesQty, SUM(P.AMOUNT) as PurchasesAmount from dbo.customer C LEFT OUTER JOIN dbo.Purchase P on C.cust_id = P.Cust_id
if PurchasesAmount returns null then use
ISNULL(SUM(AMOUNT)) as PurchasesAmount instead.
February 28, 2005 at 8:40 am
Happy that you found that funny... and I just made myself a nice base for a future function.
But I'm sorry to tell you that I know no other work around...
February 25, 2005 at 4:46 pm
Everybody needs a little cefeine at this hour on a friday.
HTH
Brain shut off sequence has begun. Happy week-end.
February 25, 2005 at 3:30 pm
Select Name, Sum(Laps) As TotalLaps
From
(
Select Name, Laps
From Tom
Union All
Select Name, Laps
From Dick
Union All
Select Name, Laps
...
February 25, 2005 at 3:08 pm
I already answered this question under your other post.
February 25, 2005 at 2:53 pm
He is right when he tells that it will cause degredation. However to cause major problems you would have to run these procs a few 1000 times/hours (if the result...
February 25, 2005 at 2:51 pm
I just played with it... have a go with this script and post the final result to us :
if object_id ('Replaces') > 0
begin
drop table Replaces
end
GO
if object_id ('Dummys') > 0
begin
drop...
February 25, 2005 at 2:35 pm
Viewing 15 posts - 18,481 through 18,495 (of 18,923 total)