Viewing 15 posts - 1,471 through 1,485 (of 1,825 total)
Your wish is my command 🙂
Happy to be proved wrong , evidence either way is good in my book.
You just need to manually update the acct value ,
and keep ...
September 18, 2009 at 9:13 am
Jeff Moden (9/18/2009)
That works but be careful... recursive CTE's are as slow as a While Loop in most cases and are actually a form of RBAR.
1st off apologies to the...
September 18, 2009 at 8:22 am
I did something very similar yesterday , try this link
September 18, 2009 at 2:41 am
Try this link
http://www.sqlservercentral.com/blogs/lynnpettis/archive/2009/03/25/some-common-date-routines.aspx
September 18, 2009 at 2:10 am
Garadin (9/17/2009)
If anyone reading this knows of a high performance method other than CLR/Quirky Update/Cursor/Loop to do iterative logic like this, I'd love to hear about it.
How about a recursive...
September 18, 2009 at 1:45 am
Well , the challenging part is sorting out the missing data ranges.
Its an extension on this technique.
http://sqlblogcasts.com/blogs/sqlandthelike/archive/2009/08/27/sql-and-contiguous-data-ranges.aspx
September 17, 2009 at 9:20 am
I love a CTE ... 🙂
with cteGaps(Date,Service,yield,Rown)
as
(
Select Date,Service,yield,row_number() over (partition by service ,case when yield is null then 1 else 0 end order by date desc)
...
September 17, 2009 at 8:41 am
app lock could work for you
September 17, 2009 at 3:41 am
Never , ever ,ever hold a lock whilst waiting for user interaction. That is a very easy way to lock your system solidy.
Your best option may be to implement...
September 17, 2009 at 12:12 am
As ever , it depends. Personally ive never used snapshot isolation , so cant comment further really.
Try this link though
http://www.sqlnewsgroups.net/group/microsoft.public.sqlserver.server/topic11164.aspx
As to wheater its acceptable in your environment with your...
September 16, 2009 at 4:39 am
You could do , i believe that SNAPSHOT has a fairly high overhead.
Arguably this could be better
SELECT id
into #IdsToupdate
FROM sometable
WHERE columnA = 1
UPDATE sometable
SET someothercolumn = someothervalue
from #IdsToupdate
WHERE #IdsToupdate.Id...
September 16, 2009 at 2:56 am
It depends on your transaction isolation level,
http://msdn.microsoft.com/en-us/library/ms173763.aspx.
The question is what do you want to happen ?
Do you want the other process blocked ?
Do you want the update to see...
September 16, 2009 at 2:14 am
Jonathan (9/15/2009)
Dave Ballantyne (9/15/2009)
Non Cte
Table 'SalesOrderDetail'. Scan count 31466, logical reads 103081, physical reads 0, read-ahead reads 0, lob...
September 16, 2009 at 2:03 am
Jonathan (9/15/2009)
SELECT SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, OrderQty, ProductID, SpecialOfferID, UnitPrice,
UnitPriceDiscount, LineTotal, ModifiedDate
FROM Sales.SalesOrderDetail d
WHERE LineTotal IN
(SELECT MIN(LineTotal)
FROM Sales.SalesOrderDetail
WHERE SalesOrderID = d.SalesOrderID)
ORDER BY SalesOrderID, SalesOrderDetailID;
------------------------------------------
WITH cte AS (SELECT SalesOrderID, SalesOrderDetailID,...
September 15, 2009 at 8:24 am
If you want to use nolock , understand the consequences
http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/11/10/1280.aspx
September 15, 2009 at 6:11 am
Viewing 15 posts - 1,471 through 1,485 (of 1,825 total)