Forum Replies Created

Viewing 15 posts - 211 through 225 (of 821 total)

  • RE: TRY_CONVERT large numbers

    The strange thing is that this code returns NULL using NVARCHAR(1)

    SELECT TRY_CONVERT(NVARCHAR(1), 234523)

  • RE: TRY_CONVERT smaller

    Hugo Kornelis (2/18/2016)


    Carlo Romagnano (2/18/2016)


    That's easy!

    But, try to answer this:

    "What's the resut?"

    SELECT TRY_CONVERT(VARCHAR(1), {D'2011-MAY-01'})

    :-D:-D:-D

    The correct answer to this question is "it depends".

    Now my question to you is if you can...

  • RE: TRY_CONVERT smaller

    That's easy!

    But, try to answer this:

    "What's the resut?"

    SELECT TRY_CONVERT(VARCHAR(1), {D'2011-MAY-01'})

    :-D:-D:-D

  • RE: Bitwise OR

    Extremely simple for C programmer!!!

    Thanks

    😀

  • RE: CHECKing Values

    Anyway -- the BOL quote explains it in technical implementation-related terms. The explanation given by Steve is the same but in more functional terms: the value is unknown, it could...

  • RE: CHECKing Values

    I disagree with explanation:

    However NULLs are not restricted as the value could be less than 10

    CHECK evaluates only true (accepted) or false (rejected) expression not UNKNOWN (accepted).

    From BOL:

    CHECK constraints reject...

  • RE: COMPRESS

    Bellissimo!

    😀

  • RE: JOIN HINTS

    Useful question!

    Thanks!

  • RE: CROSS APPLY on named sets

    I disagree with explanation, the error generated

    Msg 4104, Level 16, State 1, Line 2

    The multi-part identifier "o.object_id" could not be bound.

    it's not caused by CROSS APPLY, but a reference...

  • RE: Why Scalar Functions Can Be Costly

    bjh1977 (1/4/2016)


    Small correction required - UDFs came in as part of 2000 didn't they?

    I think they started earlier with stored procs ('90): sql 6.0

  • RE: Merry Christmas 2015

    The "order by" clause misses!

    Try this:

    declare @image as table (

    row_id tinyint

    primary key clustered (row_id desc)

    );

    insert into @image(row_id)

    values(1),(2),(3),(4),(5),(6),(7),(8),(9)

    select

    case

    when max(i.row_id) over() - i.row_id >...

  • RE: Changing a computed column

    Ed Wagner (12/18/2015)


    Carlo Romagnano (12/18/2015)


    In case of shortening or if the type is CHAR/NCHAR the following error is raised:

    Msg 5074, Level 16, State 1, Line 17

    The index 'IX_MySales_CustomerReport' is dependent...

  • RE: Changing a computed column

    In case of shortening or if the type is CHAR/NCHAR the following error is raised:

    Msg 5074, Level 16, State 1, Line 17

    The index 'IX_MySales_CustomerReport' is dependent on column 'OrderStatus'.

    Msg 4922,...

  • RE: Moving the Resource Database

    Here's a method to move resource database:

    http://www.sqlnotes.info/2012/01/06/new-way-to-relocate-resource-database/%5B/url%5D

    I never tested it, but, it seems to work.

  • RE: Committing Work

    Koen Verbeeck (11/20/2015)


    Learned something new. Thanks Steve!

    That's true

    🙂

Viewing 15 posts - 211 through 225 (of 821 total)