Forum Replies Created

Viewing 15 posts - 631 through 645 (of 825 total)

  • RE: SELECT and WHERE without FROM

    Toreador (6/24/2011)


    I wonder which of the following (if either) is more efficient:

    select @a = 1 where @b = 0

    or

    if @b = 0 set @a = 1

    "if" runs better

    declare @d datetime

    ,@a...

  • RE: SELECT and WHERE without FROM

    If the condition of the WHERE clause validates to true then the result set is returned. If it does not, the result set is empty.

    This is true only if...

  • RE: Bad Passwords

    Do you mean that for SA you get e.g. 2011-05-26 14:15:37 and for CARLO you get 1900-01-01 02:00:00?

    Yes, exactly!

  • RE: Bad Passwords

    michael.kaufmann (5/26/2011)


    Carlo Romagnano (5/26/2011)


    In sql2005, I tried with other logins than sa and I get always the following:

    1900-01-01 02:00:00.000

    Step 1: bad password attempt

    Step 2: correct login

    I run the query: SELECT...

  • RE: Bad Passwords

    -- to see all bad attempts

    SELECT l.name, loginproperty(l.name, 'BadPasswordTime')

    FROM sys.syslogins l

  • RE: Bad Passwords

    In sql2005, I tried with other logins than sa and I get always the following:

    1900-01-01 02:00:00.000

    Step 1: bad password attempt

    Step 2: correct login

    I run the query: SELECT loginproperty('carlo', 'badpasswordtime')

    The result:...

  • RE: STUFF Function

    Koen Verbeeck (5/16/2011)


    And the explanation doesn't mention why inserting NULL in another string doesn't result in NULL, but in an empty space instead.

    I am curious: bol does not mention the...

  • RE: Replication DR

    SQLRNNR (5/4/2011)


    I like it too. I also like that the R2 doc seems better written on this topic than the SQL 2008 doc

    I agree with you! 😀

  • RE: Normalization

    Great question. 😛

  • RE: Running SSMS after AD account is disabled

    In addition, the administrator should disable in AD and kill all disabled-user's connections.

  • RE: Service Broker Poison Messages

    Wonder question! 😀

  • RE: Money and Decimal Datatypes

    It's a good habit always to specify precision and scale because of changing default in future releases.

  • RE: Length

    Steve Jones - SSC Editor (4/12/2011)


    Everyone will get points back and I have corrected the question. Apologies for not fixing this earlier.

    You do not have to post to get points...

  • RE: Dating for DBAs - a second date

    Thank you very much for this beautiful qotd.

    It's unbelievable, but true, only new types DATE and DATETIME2 work in any case.

  • RE: Length

    Only one comment: I want back my points! :-D:-D:-D

Viewing 15 posts - 631 through 645 (of 825 total)