Forum Replies Created

Viewing 15 posts - 6,031 through 6,045 (of 8,416 total)

  • RE: Help- Very Complex SQL query

    Non-CTE, non-APPLY version (2000 compatible?)

    UPDATE RowsToUpdate

    SET notional = ISNULL(new_value, 50)

    FROM (

    SELECT T1.value_date_minus_1,

    ...

  • RE: Help- Very Complex SQL query

    Here's the non-CTE version:

    UPDATE RowsToUpdate

    SET notional = ISNULL(new_value, 50)

    FROM (

    SELECT T1.value_date_minus_1,

    ...

  • RE: Help- Very Complex SQL query

    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,...

  • RE: Parsing data

    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...

  • RE: Looking for Explanation for this

    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...

  • RE: Help- Very Complex SQL query

    ChrisM@home


    'Course it does, it's got a CROSS APPLY in it!:hehe:

    CROSS APPLY is an awesome operator to use for compartmenting complex stuff for an output column without fear of changing the...

  • RE: Is there a more efficient way to write this query?

    Even 'perfection' may be improved, perhaps...

    WITH Data

    AS (

    -- This does the hard work of

    ...

  • RE: How to convert DDMonYYYY into yy-mm-dd 00:00:00

    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...

  • RE: Help- Very Complex SQL query

    Re-using ChrisM's super test-data script:

    DROP TABLE #temp;

    GO

    CREATE TABLE #temp

    (

    date1 DATETIME NULL,

    date2 DATETIME NULL

    );

    GO

    INSERT #temp...

  • RE: Help- Very Complex SQL query

    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...

  • RE: Data Compression

    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...

  • RE: help with query to compress the adjacent records into one

    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...

  • RE: Unique Key on Text datatype

    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...

  • RE: Unique Key on Text datatype

    See CREATE INDEX (Transact-SQL) for details. Here is the extract relevant to your current question:


    Columns that are of the large object (LOB) data types ntext, text, varchar(max), nvarchar(max), varbinary(max),...

  • RE: Help- Very Complex SQL query

    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...

Viewing 15 posts - 6,031 through 6,045 (of 8,416 total)