Forum Replies Created

Viewing 15 posts - 421 through 435 (of 825 total)

  • RE: Transaction

    Clear and easy question! Thanks!

    🙂

  • RE: Field Lengths

    DATALENGTH provides exact length of the field if it is fixed length. If the field is of variable length, it returns the length of the data in the field

    It's...

  • RE: SSIS

    Easy, if you know it.

  • RE: What happens to a variable after COMMIT or ROLLBACK

    Too much easy!

    Thanks for TWO free points.

  • RE: Database permissions

    Ford Fairlane (10/3/2013)


    Not a big fan of questions involving deprecated features, that never seem to go away.

    +1

  • RE: Extended Procs

    sknox (10/1/2013)


    Haven't had time to research SQL 2014 yet.

    Guessed optimistically.

    Got it wrong.

    Can anyone explain why this should still be around when CLR has been available to replace its functionality since...

  • RE: Extended Procs

    I think that extended procedures are unremovable, also, if Microsoft discourages their use.

  • RE: Filestream data

    Perfect qotd and explanation.

    Thanks!

  • RE: CTE

    John Mitchell-245523 (9/26/2013)


    But my script is simpler

    I know it's a matter of preference, but I'd rather have any complexity tucked away in the CTE definition than in the body of...

  • RE: CTE

    No recursion needed to create a dynamic tally table with a CTE:

    -- Code below is SQL Server 2008 or newer

    with e1(n) as (select 1 from (values (1),(1),(1),(1),(1),(1),(1),(1),(1),(1))dt(n)),

    ...

  • RE: Executing Dynamic SQL

    Be aware of case:

    DECLARE @str VARCHAR(8000) = N'SELECT * FROM sys.objects'

    EXECUTE SP_EXECUTESQL @str

    It should be:

    DECLARE @str VARCHAR(8000) = N'SELECT * FROM sys.objects'

    EXECUTE sp_executesql @str

    🙂

  • RE: CTE

    John Mitchell-245523 (9/25/2013)


    Carlo Romagnano (9/25/2013)


    CTE is useless and complicated!

    Clearly not useless, even if your personal preference is not to use them. And no more or less complicated, in my...

  • RE: CTE

    Dscheypie (9/25/2013)


    Carlos,

    sure, you may be right.

    And the topic of this QotD is CTE and the usage of DML.

    With the example for identifying duplicate records I wouldn't agree to CTEs...

  • RE: CTE

    CTE is useless and complicated!

    The same result is reachable in a standard way:

    create table #a (i int)

    insert #a SELECT object_id FROM sys.objects

    delete from t

    from (SELECT * FROM #a WHERE i...

  • RE: CTE

    Koen Verbeeck (9/25/2013)


    Very interesting question. Never used a CTE with a DELETE statement before.

    +0.5

    Never used a CTE at all.

Viewing 15 posts - 421 through 435 (of 825 total)