Viewing 15 posts - 6,031 through 6,045 (of 8,416 total)
Non-CTE, non-APPLY version (2000 compatible?)
UPDATE RowsToUpdate
SET notional = ISNULL(new_value, 50)
FROM (
SELECT T1.value_date_minus_1,
...
February 20, 2010 at 6:42 am
Here's the non-CTE version:
UPDATE RowsToUpdate
SET notional = ISNULL(new_value, 50)
FROM (
SELECT T1.value_date_minus_1,
...
February 20, 2010 at 6:28 am
sachin1sharma (2/20/2010)
Because I am using SQL Server 2000
Oh for the love of small fluffy bunnies!!! :w00t:
You did see that this is the 2008 Forum, right?
Here is my final contribution,...
February 20, 2010 at 6:25 am
lmu92 (2/20/2010)
That's probably true (I trust your judgement 😉 ).
But if that would be the only CLR within all my databases I most certainly wouldn't use it, just because of...
February 20, 2010 at 6:05 am
nadabadan
This is not true. You can compare nulls by setting ANSI_NULLS to OFF.
But you definitely shouldn't! 😀
Setting ANSI_NULLS OFF can produce some very counter-intuitive behaviour. No wonder that it...
February 20, 2010 at 5:03 am
ChrisM@home
CROSS APPLY is an awesome operator to use for compartmenting complex stuff for an output column without fear of changing the...
February 20, 2010 at 4:57 am
Even 'perfection' may be improved, perhaps...
WITH Data
AS (
-- This does the hard work of
...
February 20, 2010 at 4:53 am
At the risk of stating the slightly obvious, you will avoid all of these sorts of problems if you store date and time data in appropriate data types. Lord...
February 20, 2010 at 4:37 am
Re-using ChrisM's super test-data script:
DROP TABLE #temp;
GO
CREATE TABLE #temp
(
date1 DATETIME NULL,
date2 DATETIME NULL
);
GO
INSERT #temp...
February 20, 2010 at 4:18 am
arun.sas (2/20/2010)
However, you should see the article posted by Wayne or at least put the identity to make sure the correct sort order.
Are you suggesting that a column with the...
February 20, 2010 at 3:58 am
Josh,
DBCC INDEXDEFRAG is another deprecated feature, and will be removed from the next version of SQL Server. You should use ALTER INDEX REORGANIZE instead.
Your example, as I am sure...
February 20, 2010 at 3:54 am
I suppose expanding the ranges could be expensive if the ranges are large.
The original posted question looks like a simple 'data island' problem to me, so we should be able...
February 20, 2010 at 3:13 am
It also occurs to me that you might be using 'text' from some past familiarity with Access. In SQL Server, text is one of the old large-object types, able...
February 20, 2010 at 12:49 am
See CREATE INDEX (Transact-SQL) for details. Here is the extract relevant to your current question:
February 20, 2010 at 12:42 am
WayneS (2/19/2010)
Hey guys... Please read this article[/url] for all the rules in using this form of the update statement - they must be followed or you can get erroneous results!
Wayne...
February 19, 2010 at 11:36 pm
Viewing 15 posts - 6,031 through 6,045 (of 8,416 total)