Viewing 15 posts - 1,126 through 1,140 (of 8,416 total)
Sergiy (1/15/2012)
Really? What is off in this analogy?
Really, yes. Does the fuel counter reset before any fuel starts being delivered? Of course. The analogy doesn't add much...
January 15, 2012 at 10:12 pm
Jeff Moden (1/15/2012)
Were you or were you not saying that it would be ok to use a counting rCTE here (for this particular problem) or not?
I was saying that the...
January 15, 2012 at 10:05 pm
Back to getting QotDs right, thank goodness. Disappointed the correct answer did not involve leprechauns or colour names.
January 15, 2012 at 8:57 am
martin.david (1/15/2012)
it has to be order by [Date] before do the comparison...
I am going to continue to assume this means ordered by date and time, Price, and Ask Client -...
January 15, 2012 at 8:54 am
Hi Chris,
Yes, this could well be a perfect use for the super-fast DISTINCT recursive CTE - well spotted!
The error about the engine not being able to obtain a LOCK resource...
January 15, 2012 at 8:49 am
Thanks very much for letting me know, I appreciate it.
January 14, 2012 at 11:07 pm
ChrisM@home (1/14/2012)
January 14, 2012 at 1:58 pm
Peter Brinkhaus (1/14/2012)
Besides, the SELECT @x = ...@x ... method seems to be unreliable (sorry, don't have details at hand, but maybe Paul is willing to jump in).
It was only...
January 14, 2012 at 1:54 pm
Ok, I had to create some new sample data to make this a bit clearer to me, but I think this is right:
DECLARE @Trading TABLE
(
ID integer...
January 14, 2012 at 1:14 pm
Lynn Pettis (1/14/2012)
You might want to drop the count to > 1 as there may only be two duplicate rows. The example provided in the original post had more.
The...
January 14, 2012 at 11:37 am
January 14, 2012 at 11:28 am
These problems are usually caused by the optimizer choosing a nested loops join for the trigger statements that join to the inserted or deleted pseudo-tables. This would be obvious...
January 14, 2012 at 11:24 am
Sharon-328725 (1/12/2012)
How to do Select Count with critria from a big table (40,000,000 records)?This is very very slow !!
SELECT
Count(TBL_TOC.ID_TOC)
FROM
TBL_TOC
WHERE
(CONTAINS(BL_TBL_TOC.TEXT, '"test*"'))
40 million rows is not that much for full-text search, even...
January 14, 2012 at 11:08 am
ChrisM@home (1/14/2012)
Edit: you've got a 700 million row sample data set on your home lappy? Good lord - I need an upgrade.
No, I just ran:
UPDATE STATISTICS dbo.Table_1
WITH ROWCOUNT =...
January 14, 2012 at 10:47 am
You can ORDER BY a CASE expression too:
SELECT
CusRange,
COUNT_BIG(*) AS NoOfCustomers
FROM
(
SELECT
...
January 14, 2012 at 10:45 am
Viewing 15 posts - 1,126 through 1,140 (of 8,416 total)